This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Cygwin && TCP && O_NONBLOCK
"Conrad Scott" <Conrad.Scott@dsl.pipex.com> wrote:
> So I assume you call connect(2) once then wait for select(2) or poll(2) to
> give you a writable status, which they do once the connection eventually
> succeeds or fails (this is mentioned in their respective man pages). So it
> looks like Linux is wrong and cygwin is right.
It occurred to me that I wasn't sure, on this account of non-blocking use of
connect(2), how to get hold of the connect/fail status of the connection,
once select(2) or poll(2) confirmed it was available. The answer: use
getsockopt(2) to check the SO_ERROR value. (Tho' I can't find mention of
this in any of the standards docs: just the Linux man pages.)
So that's okay then.
// Conrad
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/