summaryrefslogtreecommitdiffstats
path: root/Doc/library/socket.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-01-02 22:35:59 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-01-02 22:35:59 (GMT)
commitcae7c1d824fa77bb100356a7ed81f16b88e531c0 (patch)
tree726e09d5e287af5f6172b0a4d6b85dd47b6a6989 /Doc/library/socket.rst
parent59dd7abc561204b94852bdaefe2491357da980e5 (diff)
downloadcpython-cae7c1d824fa77bb100356a7ed81f16b88e531c0.zip
cpython-cae7c1d824fa77bb100356a7ed81f16b88e531c0.tar.gz
cpython-cae7c1d824fa77bb100356a7ed81f16b88e531c0.tar.bz2
Merged revisions 87653-87655 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87653 | antoine.pitrou | 2011-01-02 23:06:53 +0100 (dim., 02 janv. 2011) | 3 lines Clarify behaviour of close() and shutdown() on sockets. ........ r87654 | antoine.pitrou | 2011-01-02 23:09:27 +0100 (dim., 02 janv. 2011) | 3 lines Add a shutdown() call in the server example. ........ r87655 | antoine.pitrou | 2011-01-02 23:12:22 +0100 (dim., 02 janv. 2011) | 3 lines Some nits. ........
Diffstat (limited to 'Doc/library/socket.rst')
-rw-r--r--Doc/library/socket.rst21
1 files changed, 15 insertions, 6 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index bbe512b..4877301 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -26,6 +26,15 @@ files, buffer allocation on receive operations is automatic, and buffer length
is implicit on send operations.
+.. seealso::
+
+ Module :mod:`socketserver`
+ Classes that simplify writing network servers.
+
+ Module :mod:`ssl`
+ A TLS/SSL wrapper for socket objects.
+
+
Socket families
---------------
@@ -487,12 +496,6 @@ The module :mod:`socket` exports the following constants and functions:
same as ``type(socket(...))``.
-.. seealso::
-
- Module :mod:`socketserver`
- Classes that simplify writing network servers.
-
-
.. _socket-objects:
Socket Objects
@@ -522,6 +525,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)