1.5.12: non-blocking connect fails: deprecated method

Ivo Palli ivo@palli.nl
Fri Nov 19 14:09:00 GMT 2004


Hi,

I ran into a backward compatibility issue with Cygwin.

When doing a non-blocking connect, you do a connect with a non-blocking 
fd, wait for the select() to report it back as writable, and then 
perform a getsockopt() to check the status of the fd.

However in older code (including mine, I upgraded it now however) you 
will find that instead of calling getsockopt(), they will call connect 
again (exactly as the initial call).

Connect in cygwin gives: Transport endpoint is already connected

But Linux 2.4.22 will return 0 and accept the socket as connected. Since 
I fixed my code, it's not an issue for me. But other people might run 
into it. You might want to support the older behaviour also.

Regards,

    Ivo Palli


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list