non-blocking socket client connection
- by Igor
ALL,
I am looking for a simple example of non-blocking socket connection that will run on Windows.
I tried to Google, but all samples are either for *nix (POSIX) or blocking sockets on Windows.
Looking thru msdn I see that it is easy to make a socket non-blocking and issue a connect(), but then you need some preparation in order to put the socket back.
So, all in all I need something on a non-blocking socket that will connect and then put it back to be blocking.
The read and write operation should be performed on the blocking socket.
The reason for a non-blocking socket is that I need a connection timeout and there is no other way than non-blocking socket. Or is there?
Thank you.