Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Mar : Re: How to limit number of concurrent clients in TServerSocket?

www.cryer.info
Managed Newsgroup Archive

Re: How to limit number of concurrent clients in TServerSocket?

Subject:Re: How to limit number of concurrent clients in TServerSocket?
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Tue, 25 Mar 2008 14:59:07

"Bo Berglund" <bo.berglund@telia.com> wrote in message
news:19piu3hng3vckj502n95o213j0kqe427d4@4ax.com...

> How can I determine if a client connection already exists?

    procedure TForm1.Server1ClientConnect(Sender: TObject; Socket:
TCustomWinSocket);
    begin
        if ServerSocket1.Socket.ActiveConnections > 1 then Socket.Close;
    end;

> But at the same time I don't want to have multiple connections
> when I introduce the new functionality because only one
> connection can be open towards the physical instrumentation
> at the server side.

Then I suggest you consider using a different component that natively
supports limiting the number of connections.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive