Article View: borland.public.cppbuilder.internet.socket
Article #5759Re: TServerSocket - Limiting Connections
From: Hans Galema
Date: Tue, 22 Jun 2004 15:08
Date: Tue, 22 Jun 2004 15:08
20 lines
1585 bytes
1585 bytes
Joe St. Onge wrote:
> Hi Remy,
A selective greeting for one of the replyers.
> void __fastcall TMainForm::ChanServerSocketAccept(TObject *Sender,
> TCustomWinSocket *Socket)
> {
> if (MainForm->Connections++)
> ChanServerSocket->Close();
Why do you use a MainForm->Connection ? TServerSocket keeps
track of the number of active connections. And why do you
close The ChanServerSocket instead of the actual Socket;
if ( ChanServerSocket->Socket->ActiveConnections )
Socket->Close();
Hans.
Technical Details
Message-ID:
<40d84b21$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40d739d9@newsgroups.borland.com> <40d75c9d$1@newsgroups.borland.com> <40d84965$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11508e,68e81cd18de9d3fe X-Google-Attributes: gid11508e,public Date: Tue, 22 Jun 2004 17:08:19 +0200 From: Hans Galema <dontusethis@dontusethis.nl> User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: TServerSocket - Limiting Connections References: <40d739d9@newsgroups.borland.com> <40d75c9d$1@newsgroups.borland.com> <40d84965$1@newsgroups.borland.com> In-Reply-To: <40d84965$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 129.125.201.248 Message-ID: <40d84b21$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1087916833 129.125.201.248 (22 Jun 2004 08:07:13 -0700) Lines: 20 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail