Results 1 to 2 of 2
- 01-24-2012, 10:21 PM #1Member
- Join Date
- Jan 2012
- Rep Power
UDP server / client file transfer
i need to create a sever nd a client in java, which i managed to do, problem is that now i need to be able to send a file from server to client, which needs to be sent line by line. basically implementing a simple stop and wait protocol. any idea how to do this pls ?
- 01-24-2012, 11:14 PM #2
Re: UDP server / client file transfer
If you are sending the lines separately and want to be sure that they all arrive and are kept in order, define a protocol that includes a header record that would include the line number of the line being sent. You might have the server ask for the lines by number in its request for a line.
Server: Give me line 1
Client: Here is line 1 .... line 1's data ...
Server: Give me line 2
Client: Here is line 2 .... line 2's data ...
Whoops reverse client and server names.
- By phani in forum NetworkingReplies: 4Last Post: 10-12-2010, 06:15 PM
- By john_thomas03 in forum New To JavaReplies: 4Last Post: 07-26-2010, 02:00 PM
- By xemeGa in forum New To JavaReplies: 0Last Post: 05-05-2010, 03:59 PM
- By al_Marshy_1981 in forum NetworkingReplies: 8Last Post: 02-18-2010, 01:54 PM
- By KoolCancer in forum New To JavaReplies: 3Last Post: 07-29-2009, 04:52 AM