summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2018-01-27 08:54:13 (GMT)
committerGitHub <noreply@github.com>2018-01-27 08:54:13 (GMT)
commitd0e31b980f18101738d0ec518cb991a5fb73fe93 (patch)
treea8b9a117d4eca90bc3dc421bcec44e44691d6a14 /Doc
parent2f050c7e1b36bf641e7023f7b28b451454c6b98a (diff)
downloadcpython-d0e31b980f18101738d0ec518cb991a5fb73fe93.zip
cpython-d0e31b980f18101738d0ec518cb991a5fb73fe93.tar.gz
cpython-d0e31b980f18101738d0ec518cb991a5fb73fe93.tar.bz2
bpo-32454: socket closefd (#5048)
Add close(fd) function to the socket module Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/socket.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index db032ca..7edd4ba 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -578,6 +578,14 @@ Other functions
The :mod:`socket` module also offers various network-related services:
+.. function:: close(fd)
+
+ Close a socket file descriptor. This is like :func:`os.close`, but for
+ sockets. On some platforms (most noticeable Windows) :func:`os.close`
+ does not work for socket file descriptors.
+
+ .. versionadded:: 3.7
+
.. function:: getaddrinfo(host, port, family=0, type=0, proto=0, flags=0)
Translate the *host*/*port* argument into a sequence of 5-tuples that contain