This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: Socket programming with Cygwin


----- 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_client_main.cpp to use an IP address instead of localhost the example works for me. (It should really be modified to do a hostname lookup.)

Brian - you were absolutely right and thanks very much for taking the time
to build this project.

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 can I find out a bit more
about all this?

Thanks,

John


-- 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/


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