socket.setblocking(flag)
Set blocking or non-blocking mode of the socket: if flag is false, the socket is set to non-blocking, else to blocking mode.
This method is a shorthand for certain settimeout()
calls:
-
sock.setblocking(True)
is equivalent tosock.settimeout(None)
-
sock.setblocking(False)
is equivalent tosock.settimeout(0.0)
Please login to continue.