16.3 Nonblocking connectWhen a TCP socket is set to nonblocking and then connect is called, connect returns immediately with an error of EINPROGRESS but the TCP three-way handshake continues. We then check for either a successful or unsuccessful completion of the connection's establishment using select . There are three uses for a nonblocking connect:
As simple as the nonblocking connect sounds, there are other details we must handle:
There are many portability problems with nonblocking connects that we mention in the examples that follow. |