diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-01-02 22:06:53 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-01-02 22:06:53 (GMT) |
commit | 4a67a46543db0cec1a23106fa0bad9df5c351828 (patch) | |
tree | b2b6dc39f65d96fbf55473d930713cd52fb8814c | |
parent | abcfcba61c0825454f872131bb6fe4943d3a1ee7 (diff) | |
download | cpython-4a67a46543db0cec1a23106fa0bad9df5c351828.zip cpython-4a67a46543db0cec1a23106fa0bad9df5c351828.tar.gz cpython-4a67a46543db0cec1a23106fa0bad9df5c351828.tar.bz2 |
Clarify behaviour of close() and shutdown() on sockets.
-rw-r--r-- | Doc/library/socket.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 0a0f764..c5f2b7c 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -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) |