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:"Bo Berglund" (bo.berglu..@telia.com)
Date:Thu, 27 Mar 2008 00:06:38

On Wed, 26 Mar 2008 22:46:30 +0100, Bo Berglund
<bo.berglund@telia.com> wrote:

>On Wed, 26 Mar 2008 22:07:45 +0100, Bo Berglund
><bo.berglund@telia.com> wrote:
>
>My focus has now shifted to finding out why the activeconnections do
>not reflect the expected state.

More info:
When I do the multiple connec/disconnect of the client application I
find that the sckServer.Socket.ActiveConnections property
monotonically increments for each connection. Right now I have a log
report that it has reached 6 after my last server restart.

The strange thing is that if I run 'netstat -a -n -p tcp' on the
server it does not list any sockets as TIME WAITING or similar, I get
this instead:

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:2967           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:3389           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:23500          0.0.0.0:0              LISTENING
  TCP    10.0.0.103:139         0.0.0.0:0              LISTENING
  TCP    10.0.0.103:2929        10.0.0.4:445           ESTABLISHED
  TCP    10.0.0.103:23500       10.0.0.161:1396        ESTABLISHED
  TCP    127.0.0.1:1039         0.0.0.0:0              LISTENING
  TCP    127.0.0.1:2942         0.0.0.0:0              LISTENING
  TCP    192.168.111.11:139     0.0.0.0:0              LISTENING

So maybe I am chasing ghosts here, maybe it is just a miscalculation
inside the TServerSocket and it does not reflect the real situation at
all concerning socket use (I was afraid that the sockets would be used
up in the futrure and no connection possible after that).


/BoB

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive