Article View: borland.public.cppbuilder.internet.socket
Article #2045Re: Ethernet -- -- -- -- > How to start ?
From: Bob Gonder
Date: Tue, 29 Aug 2006 03:18
Date: Tue, 29 Aug 2006 03:18
25 lines
1964 bytes
1964 bytes
Ori wrote: >of errors, for example it don't know 'AI_PASSIVE', and it can't >find the getaddrinfo() function, and lot of other errors, how do >I make this code working? AI_PASSIVE: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/addrinfo_2.asp Which lists the Flags for addrinfo, including 'AI_PASSIVE', which I found by typing AI_PASSIVE in the search box which is in the upper left of every page........ But..... It looks like getaddrinfo is a new function, and you don't really need it. It is used to get the values for this call... > ListenSocket = socket(result->ai_family, result->ai_socktype, result->ai_protocol); But the old way works too, and is easier... ListenSocket = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP ); You should only need #include <winsock2.h> #include <windows.h> Also, I suggest you get send/receive working on a single CPU before venturing into the realm of PC-to-PC.
Technical Details
Message-ID:
<gu97f21vlpuo3774n1hh8bd2i2fa1ec3p2@4ax.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<44f2a254$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,fe1fd6d71370df56 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: Ethernet -- -- -- -- > How to start ? Date: Mon, 28 Aug 2006 20:18:24 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <gu97f21vlpuo3774n1hh8bd2i2fa1ec3p2@4ax.com> References: <44f2a254$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.147.83 X-Trace: newsgroups.borland.com 1156821502 67.77.147.83 (28 Aug 2006 20:18:22 -0700) Lines: 27 Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail