|
Question : EINPROGRESS errno in connect
|
|
I am writing an application (TCP server) that creates a nonblocking socket. When it executes connect function it returns the error
EINPROGRESS
the connect function describes what follow
The socket is nonblocking; the connection can't be completed immediately. It's possible to do a select() for completion by selecting the socket for writing.
What I really do not know is how to use select function when using sockets.
Thank you for your help
|
Answer : EINPROGRESS errno in connect
|
|
> I just want to ensure that my application would not block if it works on a bad network. there is no way to ensure that ... When communicating over networks, delays are beyond our control .. Best we can do is try to minimize the impact by setting timeouts on calls whereever possible and if non-blocking is necessary, use something like an alram() to signal you incase you are blocked for more than specified time.
|
|
|