]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-112020: Document the meaning of empty bytes returned by socket.recv() ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 20 Feb 2024 15:00:30 +0000 (16:00 +0100)
committerGitHub <noreply@github.com>
Tue, 20 Feb 2024 15:00:30 +0000 (15:00 +0000)
(cherry picked from commit e71468ba4f5fb2da0cefe9e923b01811cb53fb5f)

Co-authored-by: talcs <talh8787@gmail.com>
Doc/library/socket.rst

index 809c8469e01fe510c2e44cb44359557d48285efc..3a5368717ac1bf5e9ef1a49f3e848832d20f4917 100644 (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::