in reply to maybe OT, connection speed
When I've done this in the past, I have my servers response to a client begin with a preamble that includes the length, in bytes, of the response as a whole. Then all the client has to do is keep a running total of the number of bytes that have come in on the socket. HTTP does the same thing with the Content-Length header.
HTH
|
|---|