X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
X-MUA: Microsoft Outlook Express 6.00.2900.2180Produced By Microsoft MimeOLE  V6.00.2900.2180
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AqAEABv/NUlPQhFL/2dsb2JhbACDfVDOCYJ/
X-IronPort-AV: E=Sophos;i="4.33,708,1220223600";     d="scan'208";a="111602798"
Message-ID: <008701c9553b$c4751a50$4001a8c0@mycomputer>
From: "John Emmas" <johne53@tiscali.co.uk>
To: <cygwin@cygwin.com>
References: <003201c9552c$a57b1a00$4001a8c0@mycomputer> <493665A0.6F1DE647@dessent.net>
Subject: Re: Socket programming with Cygwin
Date: Wed, 3 Dec 2008 11:39:13 -0000
MIME-Version: 1.0
Content-Type: text/plain; 	format=flowed; 	charset="iso-8859-1"; 	reply-type=original
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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

