Safer reads on the socket. Before we assumed to receive the message size in...
Safer reads on the socket. Before we assumed to receive the message size in one 4-byte-sized block, but the new code handles when the size is split in many blocks now. Reads have been tested manually with python sockets and struct packing. Example : for i in [164, 1, 0, 0] sock.sendall(struct.pack('B', i)) is supposed to send 420 as a 32-bit little-endian unsigned integer.
Showing with 31 additions and 13 deletions