Revision 1d1c5aa9-38ab-47be-b6db-fb39d2672e31 - Stack Overflow

Use [`socket.settimeout()`][1] before you perform a blocking operation to control its timeout. So in your case it sounds like you don't want a timeout for `connect()`, but one for `recv()`.

 [1]: https://docs.python.org/2/library/socket.html#socket.socket.settimeout

AltStyle によって変換されたページ (->オリジナル) /