Re: Socket programming with Cygwin

2008-12-03 Thread Corinna Vinschen
On Dec 3 04:29, Brian Dessent wrote: > John Emmas wrote: > > > Forgive me - but as someone who's very new to socket programming, I'm > > confused about why the program worked when I built it under Linux. Is it > > because something would have converted "localhost" to an IP address (is this > > t

Re: Socket programming with Cygwin

2008-12-03 Thread Brian Dessent
John Emmas wrote: > Forgive me - but as someone who's very new to socket programming, I'm > confused about why the program worked when I built it under Linux. Is it > because something would have converted "localhost" to an IP address (is this > the lookup stuff that you referred to?) and where c

Re: Socket programming with Cygwin

2008-12-03 Thread Warren Young
John Emmas wrote: confused about why the program worked when I built it under Linux. As Brian said, glibc's inet_pton() is apparently doing something beyond what the standard requires. Cygwin doesn't use glibc, it uses a different standard C library called newlib. -- Unsubscribe info:

Re: Socket programming with Cygwin

2008-12-03 Thread John Emmas
- Original Message - From: "Brian Dessent" Subject: Re: Socket programming with Cygwin The call fails because addr is junk, because the demo passed "localhost" to inet_pton. According to the docs, this function only takes IP addresses. If you change simple_clien

Re: Socket programming with Cygwin

2008-12-03 Thread Brian Dessent
John Emmas wrote: > In every case, the programs fail when the client attempts to connect to the > server. This would be a typical line:- > > status = ::connect ( m_sock, ( sockaddr * ) &addr, sizeof ( addr ) ); > > 'status' receives -1 and if I check the error it's invariably something like > "