Hi, I have an application where the user can select a computer on the LAN and when user selects transfer a set of files should be transferred from my computer to the selected computer.I have to do this using sockets .can some one please give me some idea on how to start this.
I was thinking of writing a server socket which will be installed along with another software on all the machines in the LAN.When i run the application on my machine and select transfer how can i make the server socket program to start on the remote computer?
posted 9 years ago
Hi, welcome to the ranch!
I'd say it's in the definition of a server that it has to be running before it can accept any requests, so you can't send it a request to start. I Googled for "java windows service" and found this article. You might be able to make your file receiver server start up automatically this way.
The server needs to open a ServerSocket and wait for incoming connections. If you're not comfortable with this bit, work through Sun's All About Sockets tutorial.
Did that match your question? If you have more specific problems, I encourage you to post smallish bits of almost-working code and we can try to help out.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi