diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-09-01 09:12:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-01 09:12:52 (GMT) |
commit | 5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe (patch) | |
tree | 2a3eee6b520cafadc4c3b950e73bad0c0b1aa5ce /Doc/howto/sockets.rst | |
parent | eb8974616bc58f44b2a3c3e4ca2326894ae42c8f (diff) | |
download | cpython-5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe.zip cpython-5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe.tar.gz cpython-5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe.tar.bz2 |
bpo-15999: Always pass bool instead of int to socket.setblocking(). (GH-15621)
Diffstat (limited to 'Doc/howto/sockets.rst')
-rw-r--r-- | Doc/howto/sockets.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/howto/sockets.rst b/Doc/howto/sockets.rst index bc71d85..4655f28 100644 --- a/Doc/howto/sockets.rst +++ b/Doc/howto/sockets.rst @@ -317,7 +317,7 @@ know about the mechanics of using sockets. You'll still use the same calls, in much the same ways. It's just that, if you do it right, your app will be almost inside-out. -In Python, you use ``socket.setblocking(0)`` to make it non-blocking. In C, it's +In Python, you use ``socket.setblocking(False)`` to make it non-blocking. In C, it's more complex, (for one thing, you'll need to choose between the BSD flavor ``O_NONBLOCK`` and the almost indistinguishable Posix flavor ``O_NDELAY``, which is completely different from ``TCP_NODELAY``), but it's the exact same idea. You |