🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1322

Re: Using Winsock 2.0

#1322
From: Remy Lebeau (TeamB)
Date: Wed, 21 Feb 2007 18:28
21 lines
1427 bytes
"Eduardo Jauch" <eduardo.jauch@gmail.com> wrote in message
news:45dc601b$1@newsgroups.borland.com...

>    int sockfd;

socket() returns a SOCKET handle, not an int.

>    sockfd = socket(AF_INET, SOCK_STREAM, 0);

You did not call WSAStartup() before calling socket().  You must do
so, in order to specify the version of WinSock that you want to use,
and to validate that it is actually available.

> But always get sockfd with a -1 value and the ESAGetLastError
> with the value 10093.

10093 is WSANOTINITIALISED.


Gambit
Technical Details
Message-ID: <45dc8f52$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45dc601b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a28f1afb8b745a2a
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <45dc601b$1@newsgroups.borland.com>
Subject: Re: Using Winsock 2.0
Date: Wed, 21 Feb 2007 10:28:44 -0800
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.83.34.171
Message-ID: <45dc8f52$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1172082514 75.83.34.171 (21 Feb 2007 10:28:34 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail