In the documentation of the socket
module it is written that:
Sockets are always created in blocking mode. In blocking mode, operations block until complete or the system returns an error (such as connection timed out).
Also, this SO answer says:
By default, if no explicit timeout is set for the socket, it will block while doing so and eventually timeout, raising exception
socket.error: [Errno 110] Connection timed out
My question is, in what situation a blocking socket (or is it the OS?) will raise a timeout? Can I have some control over this timeout, or is the only thing I can do is to catch the exception?
EDIT Am I mixing the socket timeout with connection timeout? What is the difference?