[Python-checkins] r87653 - python/branches/py3k/Doc/library/socket.rst
antoine.pitrou
python-checkins at python.org
Sun Jan 2 23:06:54 CET 2011
Author: antoine.pitrou
Date: Sun Jan 2 23:06:53 2011
New Revision: 87653
Log:
Clarify behaviour of close() and shutdown() on sockets.
Modified:
python/branches/py3k/Doc/library/socket.rst
Modified: python/branches/py3k/Doc/library/socket.rst
==============================================================================
--- python/branches/py3k/Doc/library/socket.rst (original)
+++ python/branches/py3k/Doc/library/socket.rst Sun Jan 2 23:06:53 2011
@@ -552,6 +552,12 @@
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)
More information about the Python-checkins
mailing list