8000 gh-112020: Document the meaning of empty bytes returned by socket.rec… · diegorusso/cpython@39bb8a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 39bb8a5

Browse files
talcsdiegorusso
authored andcommitted
pythongh-112020: Document the meaning of empty bytes returned by socket.recv() (pythonGH-112055)
1 parent 2d2ec89 commit 39bb8a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/socket.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,8 +1605,9 @@ to sockets.
16051605

16061606
Receive data from the socket. The return value is a bytes object representing the
16071607
data received. The maximum amount of data to be received at once is specified
1608-
by *bufsize*. See the Unix manual page :manpage:`recv(2)` for the meaning of
1609-
the optional argument *flags*; it defaults to zero.
1608+
by *bufsize*. A returned empty bytes object indicates that the client has disconnected.
1609+
See the Unix manual page :manpage:`recv(2)` for the meaning of the optional argument
1610+
*flags*; it defaults to zero.
16101611

16111612
.. note::
16121613

0 commit comments

Comments
 (0)
0