File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1944,8 +1944,10 @@ to sockets.
19441944 optional *flags * argument has the same meaning as for :meth: `recv ` above.
19451945 Returns the number of bytes sent. Applications are responsible for checking that
19461946 all data has been sent; if only some of the data was transmitted, the
1947- application needs to attempt delivery of the remaining data. For further
1948- information on this topic, consult the :ref: `socket-howto `.
1947+ application needs to attempt delivery of the remaining data. Unlike :meth: `recv `,
1948+ this method will automatically raise an :exc: `OSError ` in the case of a broken socket.
1949+ As such, there is no need to check the return value to determine if a socket is closed.
1950+ For further information on this topic, consult the :ref: `socket-howto `.
19491951
19501952 .. versionchanged :: 3.5
19511953 If the system call is interrupted and the signal handler does not raise
You can’t perform that action at this time.
0 commit comments