[3.11] gh-112020: Document the meaning of empty bytes returned by socket.recv() (GH-112055) (GH-115723)

(cherry picked from commit e71468ba4f)

Co-authored-by: talcs <talh8787@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-02-20 16:00:30 +01:00 committed by GitHub
parent b3384af464
commit 5a0d51b629
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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