Skip to content

Commit e71468b

Browse files
authored
gh-112020: Document the meaning of empty bytes returned by socket.recv() (GH-112055)
1 parent e00960a commit e71468b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/socket.rst

+3-2
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)