We are using WinSock2 library to establish a TCP/IP connection from client
to server. When host we are trying to connect to is not available (e.g.
switched off) it takes considerable time before connect() returns. Is it
possible to limit somehow timeout for connect() on the level of socket so,
that detection of unavailability of host takes less time?