mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Clarify behaviour of close() and shutdown() on sockets.
This commit is contained in:
parent
abcfcba61c
commit
4a67a46543
1 changed files with 6 additions and 0 deletions
|
@ -552,6 +552,12 @@ correspond to Unix system calls applicable to sockets.
|
|||
remote end will receive no more data (after queued data is flushed). Sockets are
|
||||
automatically closed when they are garbage-collected.
|
||||
|
||||
.. note::
|
||||
:meth:`close()` releases the resource associated with a connection but
|
||||
does not necessarily close the connection immediately. If you want
|
||||
to close the connection in a timely fashion, call :meth:`shutdown()`
|
||||
before :meth:`close()`.
|
||||
|
||||
|
||||
.. method:: socket.connect(address)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue