mirror of
https://github.com/python/cpython.git
synced 2025-10-28 17:13:08 +00:00
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.
This commit is contained in:
parent
ba8a98600e
commit
e43f9d0ed6
6 changed files with 50 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -136,6 +136,12 @@ New, Improved, and Deprecated Modules
|
|||
|
||||
(Contributed by Tarek Ziadé.)
|
||||
|
||||
* Socket objects now have a :meth:`~socket.socket.forget()` method which
|
||||
puts the socket into closed state without actually closing the underlying
|
||||
file descriptor. The latter can then be reused for other purposes.
|
||||
|
||||
(Added by Antoine Pitrou; :issue:`8524`.)
|
||||
|
||||
* The *sqlite3* module has some new features:
|
||||
|
||||
* XXX *enable_load_extension*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue