mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-15999: Always pass bool instead of int to socket.setblocking(). (GH-15621)
This commit is contained in:
parent
eb8974616b
commit
5eca7f3f38
7 changed files with 18 additions and 18 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue