[docs] doc bug report
shaharyi88 at gmail.com
Wed Feb 3 15:37:13 EST 2016
In the client-side code here:
received = sock.recv(1024)
is a bad programming example.
This is not the proper way to receive data using a socket.
You must receive in a loop until a whole message is received or the socket
is closed (getting empty data).
The least you can do is say that this is only for the demo to work in most
cases. I.e., when the machine network card is not too busy.
To clarify, say the network card was busy and only managed to read 5 bytes
in the single recv() call you have. The client-output in this case would be
"PYTHON" and not "PYTHON IS NICE".
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the docs