]> granicus.if.org Git - python/commitdiff
Clarify behaviour of close() and shutdown() on sockets.
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 2 Jan 2011 22:06:53 +0000 (22:06 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 2 Jan 2011 22:06:53 +0000 (22:06 +0000)
Doc/library/socket.rst

index 0a0f76420b37b51a6d71de2555e418380ef6c742..c5f2b7c52266f61f2f34152769ca0c3b3a43470a 100644 (file)
@@ -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)