From c7f8d92dd7a764e6c46c0e83a0efcbbce47fb277 Mon Sep 17 00:00:00 2001 From: talcs Date: Tue, 14 Nov 2023 14:11:08 +0200 Subject: [PATCH 1/2] Update socket.rst - 0-bytes returned by socket.recv --- Doc/library/socket.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 9ff1aa3984e828..874b5958ae5584 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -1606,8 +1606,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 return value of length 0 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:: From 786a6bed08cf6f70bf2ef868c14e9c780508a5fd Mon Sep 17 00:00:00 2001 From: talcs Date: Tue, 20 Feb 2024 13:14:36 +0200 Subject: [PATCH 2/2] Update socket.rst --- Doc/library/socket.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 874b5958ae5584..919ee462633b9d 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -1606,7 +1606,7 @@ 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*. A return value of length 0 indicates that the client has disconnected. + 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.