delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/12/09/14:17:39

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Sat, 9 Dec 2000 14:17:18 -0500 (EST)
From: Dave Johnson <lists-cygwin AT centerclick DOT org>
To: cygwin AT cygwin DOT com
Subject: getsockname() doesn't fill out data after non-blocking connect()
Message-ID: <Pine.LNX.4.10.10012091358380.15913-100000@alliance.centerclick.org>
MIME-Version: 1.0

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 AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019