Closed EDVTAZ closed 5 years ago
Hi, when sending long messages, sometimes not all of the message arrived. As far as I can tell, this is due to TCP packet fragmentation (https://stackoverflow.com/questions/756765/when-will-a-tcp-network-packet-be-fragmented-at-the-application-layer). One way of fixing this is prepending the message with it's length, and then receiving exactly that much bytes.
Prepend messages with their length before sending them, this way we can receive them correctly, even if they get fragmented.
Signed-off-by: Gabor Szekely szvgabor@gmail.com