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" To: 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 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 AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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/