I've some codes that I've found from a Java cookbook which is able to open a connection port to send a message to the server. I've managed to get the client and server to communicate.
However, I'm kinda lost on how can I get it to transfer a file. Can any kind soul guide me on how I can acheive that?
Joined: Jan 29, 2003
I think it's as easy as read bytes from disk on one end, send bytes over the wire, write bytes to disk on the other end. You can make up a protocol, say send a header first with the filename and length, followed by length number of bytes. The Sun Networking Tutorial has some neat examples of the "knock knock" protocol that should be good inspiration.
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