Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6535651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:23:54+00:00 2026-05-25T10:23:54+00:00

I have a server application and a client application in order to send and

  • 0

I have a server application and a client application in order to send and receive files between computers.

you may skip this part:

My algorithm is as follows:

`server:  start listening for connections

client: establish a connection with the server

server: start a thread where that thread consist of a method listening for data send through the network stream

client: also start listening for data on a while loop runing on a separate thread.


\\so far if the client sends a byte array through the connection netwrok stream the server will receive it.

\\ also in each while lop the client and server there is a switch statement. if data received commes with the string "<file>" then it will start listening for the transfer of a file


client: send the string "<file>" to the server and start listening for that file on a different method.

server: because it receives the "<file>" keword it exits the listening loop and sends "<ok>" reply

.... so the talking between server and client keeps going ...........`


also the server is running yet more other threads such as still listening for
new connections. maybe another client want's to connect to it. so every time 
a client connects the server, the server will start doing the same process 
again on a separate thread (listening for new connections). 

So as you can see everything that get’s sent through the network stream get’s received by the other application.

So everything works great when a connection is established

Now think about the things that have to happen in order to establish a connection from computer A that happens to be in a house and Computer B happens to be on a office on a different network. Note (computer A and computer B have internet access). so let’s say you want your computer A to be the server and computer B to be the client. So you will have to start the server. great the server is now running. Then you will start the client application. You will also have to tell the router in the house to forward all traffic from port X to that server computer so that computer B is able to find it. Once you do that computer B is able to establish a connection. If next day you have a different IP address because most of us we don’t have static IP you will have to change that IP on the client computer in order to establish a connection. so it can get quite complicated and not friendly. Also you may want your office computer to be the server because it might always be on but maybe you don’t have access to the router so you are screwed.

Solutions:

1)

on my house call my internet service providers and pay to get a static IP. 
I have not developed an algorithm but basically now computer A and computer 
B will be clients and they will be connected to my computer at my house. 
(on my house I will have to configure the router obviously to do port forwarding).
so know if computer A wants to send a file to computer B the server at my house 
needs to have those to connections. the connection between computer A and the 
connection through computer B. If something get's sent to the server at my 
house from computer A then sent that to computer B and vice versa. 

problems with this solution is: The upload speed at my house is very slow therefore
the transferring of files will be slow. also I don't know if my network at my 
house will be able to manage multiple connections. 

2)

step 1)
Host a website from my home still getting a static ip address. this time I also 
have to get a domain so that users can remember me. so let's say that I am able
to host this website hosted on my house as somedomain.com  . soon you understand 
the purpose of the website....

step 2)
I don't know that much about this it is called "UDP punch hole into firewall". 
this basically tells the router to port forward all traffic from port x to the 
server so that users don't have to open ports on their routers. I DO NOT KNOW 
HOW TO DEVELOP THIS I HAVE JUST HEARD ABOUT IT. so if I develop this computer 
A will be able to connect to computer B without having to do any configuration 
on the router which is nice.

step 3)
let's say that computer B is the server and computer A is the client that want's 
to connect to computer B. so computer B will talk to my website at my house and 
tell it that it is listening for connections on the ip address xxx.xxx.xxx.xxx . 
then the client computer will access the website at my house and see the ip address 
of computer B. now the connection is going to be able to be established.  

step 4)
If the internet IP address of computer B changes for example. then let my website 
know the new IP address. next time the client want's to connect to the server it 
will be able to find the correct IP by looking into my website.

problems with this technique: I do not know how to implement
"UDP punch hole into firewall" so that users do not have to do any configurations 
on their routers. an example of this will be helpful.

3)

there are a lot of companies out there that can host you a website. I don't know 
about a company that will let me run a c# console application on their server. 
Also I don't know if the file transfer of data going from computer A to a server 
then to Computer B is more efficient than data going from computer A to computer B. 
This solution will enable me to stop thinking about users having to configure their 
routers which is nice. 

This application enables you to do many more things. I know there are several applications that will enable me to just transfer files. It will be nice if someone will point me on the right direction of which technique to use.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:23:54+00:00Added an answer on May 25, 2026 at 10:23 am

    If you use a a free DNS provider like DynDns free and a DNS updater for your dynamic IP like this one, then you can connect to your server by DNS name instead of IP address. Using the updater, when your address changes, the DNS record will be updated at the DNS provider.

    Another option might be to use DropBox to synchronize a folder between the client and the server, and then convert your server application into a directory monitor that looks for new files synchronized by dropbox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a client application, and a server one. I want to send a
I have an web-application and inside the server-part I created a MessageDrivenBean in order
I am implementing a client/server application where video streaming occurs between two computers (in
I have a client application that communicates with a server. In this application the
I have an application with the architecture like client/server/db . Communication between client and
I have a Client/Server application, where the Client and Server have some common tables
i have a server - client application that runs on java 1.3; i want
My requirement is I have server J2EE web application and client J2EE web application.
We have a client/server application with a rich client front end (in .Net) and
I have a client/server application that communicates with .Net remoting. I need my clients

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.