|
The sockets can be slows, depends on your connection.
The best is that you send an integer indicating how many bytes are you going to send. In other side, reads the integer, and then the number of bytes that indicates.
Another choice is that the sender closes the connection, in this way the receiver reading until the connection close.
good luck
|