🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: a Client connection without Server accept() : possible ?

#2279
From: Remy Lebeau (TeamB)
Date: Thu, 01 Jun 2006 17:44
25 lines
2044 bytes
"didier" <jehanno@lal.in2p3.fr> wrote in message
news:447eddb9$1@newsgroups.borland.com...

> RESULT : The client tells that the connection has been
> successfully established with the server. I verify this with
> the flag ClientSocket->Socket->Connected = true !

The Connected property is set to true as soon as the WinSock API connect()
function completes its work.

> I cannot find any explanation. It changes my view of the listen
> function : it does not work as I believe... I thought that only
> the accept() function validates the client connection request...

accept() provides a SOCKET handle to the server code to access the
connection.  The only explanation for what you see is that the connection
itself has been established when it is placed in the server socket's queue
that was created by listen().  The server socket knows the connection it
there, it just hasn't retreived it from the queue yet.  In the meantime,
listen() returned a response back to the client to let it know that the
connection was acknowledged.


Gambit
Technical Details
Message-ID: <447f2da6@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.volia.net!solnet.ch!solnet.ch!newsfeed.freenet.de!news.code-werk.net!open-news-network.org!news.soft-gems.net!reader.uucp.at!feeder02.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail
References: <447eddb9$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a5bb198ebfc9fddf
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: <447eddb9$1@newsgroups.borland.com>
Subject: Re: a Client connection without Server accept() : possible ?
Date: Thu, 1 Jun 2006 10:44:35 -0700
Lines: 27
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: 68.69.17.41
Message-ID: <447f2da6@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1149185446 68.69.17.41 (1 Jun 2006 11:10:46 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.volia.net!solnet.ch!solnet.ch!newsfeed.freenet.de!news.code-werk.net!open-news-network.org!news.soft-gems.net!reader.uucp.at!feeder02.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail