summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2018-01-28 22:27:38 (GMT)
committerGitHub <noreply@github.com>2018-01-28 22:27:38 (GMT)
commitf11b460d8717fc3a5810684713b8b818f68789e8 (patch)
tree3e5d87dccf168ef8a2df56120876c77e83fc8cfc /Doc
parent631fd38dbf04dbf0127881f3977982e401a849e4 (diff)
downloadcpython-f11b460d8717fc3a5810684713b8b818f68789e8.zip
cpython-f11b460d8717fc3a5810684713b8b818f68789e8.tar.gz
cpython-f11b460d8717fc3a5810684713b8b818f68789e8.tar.bz2
bpo-32373: Add socket.getblocking() method. (#4926)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/socket.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 7edd4ba..faa260e 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -1087,6 +1087,16 @@ to sockets.
to decode C structures encoded as byte strings).
+.. method:: socket.getblocking()
+
+ Return ``True`` if socket is in blocking mode, ``False`` if in
+ non-blocking.
+
+ This is equivalent to checking ``socket.gettimeout() == 0``.
+
+ .. versionadded:: 3.7
+
+
.. method:: socket.gettimeout()
Return the timeout in seconds (float) associated with socket operations,