@@ -171,13 +171,12 @@ that *there is no* :abbr:`EOT (End of Transfer)` *on a socket.* If a ``recv``
171171returns 0 bytes, the connection has been broken. In contrast, you should never
172172call ``send `` on a broken socket, as it will raise an :exc: `OSError ` rather than
173173returning 0. If the connection has *not * been broken, you may wait on a
174- ``recv ``
175- forever, because the socket will *not * tell you that there's nothing more to
176- read (for now). Now if you think about that a bit, you'll come to realize a
177- fundamental truth of sockets: *messages must either be fixed length * (yuck), *or
178- be delimited * (shrug), *or indicate how long they are * (much better), *or end by
179- shutting down the connection *. The choice is entirely yours, (but some ways are
180- righter than others).
174+ ``recv `` forever, because the socket will *not * tell you that there's nothing
175+ more to read (for now). Now if you think about that a bit, you'll come to
176+ realize a fundamental truth of sockets: *messages must either be fixed length *
177+ (yuck), *or be delimited * (shrug), *or indicate how long they are * (much
178+ better), *or end by shutting down the connection *. The choice is entirely
179+ yours, (but some ways are righter than others).
181180
182181Assuming you don't want to end the connection, the simplest solution is a fixed
183182length message::
0 commit comments