In article <1194884767.345250.314750@v23g2000prn.googlegroups .com>,
rdeviant@gmail.com (edoc) writes:
Another option, which I had cause to use recently, is to make the
connect() itself nonblocking. To do so, move your ioctlsocket()
or WSAAsyncSelect() call immediately ahead of your connect() call.
(You can use ioctlsocket() instead of WSAAsyncSelect() if you have
a console application that doesn't have a window handle, or if you
don't care about notifications.)
You'll have to do a select() to see whether your connection has
been set up (use a timeout value of zero to make the select()
itself nonblocking), but then you're free to go off and do other
things while you're waiting for the connection to set up (or fail).
--
/~\ cgibbs@kltpzyxm.invalid (Charlie Gibbs)
\ / I'm really at ac.dekanfrus if you read it the right way.
X Top-posted messages will probably be ignored. See RFC1855.
/ \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!