Socket Question
-
Okay I am seriously stumped.... There must be a way for a socket object to tell when it is done recieving a file... If we are just serializing a class and sending it between a client and a server and the object is 700 bytes.. How can I tell when the object is done sending... I am sending this object over and over... So i need to know when it begins and when it ends. Please help me out.. Please please please.... Thanks, Steve Nelson.
-
Okay I am seriously stumped.... There must be a way for a socket object to tell when it is done recieving a file... If we are just serializing a class and sending it between a client and a server and the object is 700 bytes.. How can I tell when the object is done sending... I am sending this object over and over... So i need to know when it begins and when it ends. Please help me out.. Please please please.... Thanks, Steve Nelson.
-
Okay I am seriously stumped.... There must be a way for a socket object to tell when it is done recieving a file... If we are just serializing a class and sending it between a client and a server and the object is 700 bytes.. How can I tell when the object is done sending... I am sending this object over and over... So i need to know when it begins and when it ends. Please help me out.. Please please please.... Thanks, Steve Nelson.
You need to add some control protocol to the stream. Very simple would be send a fixed number of bytes that contain the size of the object first, let the reciver read that, then read that number of bytes from the stream, then repeat. I do not suggest that you do something this simple in real life though, buu you get the picture? Stephen.
-