Skip to content

Commit c9f45c0

Browse files
committed
gh-109532: rewrap paragraph in socket HOWTO
1 parent bd3e1ce commit c9f45c0

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

Doc/howto/sockets.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,12 @@ that *there is no* :abbr:`EOT (End of Transfer)` *on a socket.* If a ``recv``
171171
returns 0 bytes, the connection has been broken. In contrast, you should never
172172
call ``send`` on a broken socket, as it will raise an :exc:`OSError` rather than
173173
returning 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

182181
Assuming you don't want to end the connection, the simplest solution is a fixed
183182
length message::

0 commit comments

Comments
 (0)