diff options
Diffstat (limited to 'Doc/library/socket.rst')
-rw-r--r-- | Doc/library/socket.rst | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 2b43266..f340920 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -538,6 +538,15 @@ correspond to Unix system calls applicable to sockets. connects. +.. method:: socket.detach() + + Put the socket object into closed state without actually closing the + underlying file descriptor. The file descriptor is returned, and can + be reused for other purposes. + + .. versionadded:: 3.2 + + .. method:: socket.fileno() Return the socket's file descriptor (a small integer). This is useful with @@ -548,14 +557,6 @@ correspond to Unix system calls applicable to sockets. this limitation. -.. method:: socket.forget() - - Put the socket object into closed state without actually closing the - underlying file descriptor. This allows the latter to be reused. - - .. versionadded:: 3.2 - - .. method:: socket.getpeername() Return the remote address to which the socket is connected. This is useful to |