This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

getsockname() doesn't fill out data after non-blocking connect()


While porting an application to cygwin I've discovered the following:

After a non-blocking connect() is called for a TCP connection I am calling
getsockname() to determine the IP on the local size of the connection
attempt.

After calling getsockname() and getting the IP address from
.sin_addr.s_addr of the sockaddr_in structure the IP was filled out with
0's instead of the IP address of the interface in which the connection
attempt is going out on.

Doing another getsockname() after the socket becomes writable and the
connection is completed returns valid data.

Other UNIX OS's will return valid socket information after a non-blocking
connect().  Is this a limitation of cygwin or a bug?

This is with cygwin 1.1.4




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]