PyDocs

Nav

Networking and Interprocess Communication

socket.settimeout

socket

method of socketnot WASI
  • socket.settimeout(value)
settimeout(timeout)

Set a timeout on socket operations.  'timeout' can be a float,
giving in seconds, or None.  Setting a timeout of None disables
the timeout feature and is equivalent to setblocking(1).
Setting a timeout of zero is the same as setblocking(0).
Changed in 3.7, 3.15
  • 3.7: The method no longer toggles SOCK_NONBLOCK flag on socket.type.
  • 3.15: Accepts any real number, not only integer or float.
0 Examples
No examples for socket/socket.settimeout.
See Also
No see-alsos for socket/socket.settimeout
0 Notes
No notes for socket.settimeout