delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/12/03/06:40:17

X-Recipient: archive-cygwin AT delorie DOT 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 AT tiscali DOT co DOT uk>
To: <cygwin AT cygwin DOT com>
References: <003201c9552c$a57b1a00$4001a8c0 AT mycomputer> <493665A0 DOT 6F1DE647 AT dessent DOT net>
Subject: Re: Socket programming with Cygwin
Date: Wed, 3 Dec 2008 11:39:13 -0000
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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/

- Raw text -


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