This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: AF_INET connection refused help pls
On Thu, Dec 06, 2001 at 06:16:02AM -0500, Haksun Li wrote:
> I am having problem writing a little program using cygwin. It is about a
> client sending message to a server.
User error.
> Server:
> [...]
> server_addr.sin_family = hp->h_addrtype;
> bcopy((char*)hp->h_addr, (char*)&server_addr.sin_addr, hp->h_length);
> server_addr.sin_port = port;
That should read:
server_addr.sin_port = htons(port);
It works coincidentally on Solaris because host and network byteorder
are the same on Solaris.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.
--
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/