summaryrefslogtreecommitdiffstats
path: root/Doc/library/socket.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-08-08 23:24:50 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-08-08 23:24:50 (GMT)
commite43f9d0ed69addbc34bac4af1b3ad7f1bdd3b149 (patch)
treee15aa8c051472ddb7ec9a684d9a4e546ee3e14ca /Doc/library/socket.rst
parentba8a98600eddc5e2a87a9148e634ada1a1056495 (diff)
downloadcpython-e43f9d0ed69addbc34bac4af1b3ad7f1bdd3b149.zip
cpython-e43f9d0ed69addbc34bac4af1b3ad7f1bdd3b149.tar.gz
cpython-e43f9d0ed69addbc34bac4af1b3ad7f1bdd3b149.tar.bz2
Issue #8524: Add a forget() method to socket objects, so as to put the
socket into the closed state without closing the underlying file descriptor.
Diffstat (limited to 'Doc/library/socket.rst')
-rw-r--r--Doc/library/socket.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 75d86b7..2b43266 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -548,6 +548,14 @@ 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