Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Re: Connection Pool with TIdTCPServer

www.cryer.info
Managed Newsgroup Archive

Re: Connection Pool with TIdTCPServer

Subject:Re: Connection Pool with TIdTCPServer
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Wed, 28 Jun 2006 17:38:59

"Gerhard Venter" <IeatSpam4breakfast@spam.com> wrote in message
news:44a30a42$1@newsgroups.borland.com...

> Upon completion of a socket write - socket read sequence
> the connection is released back to the pool.
<snip>
> found that the read times out but the other server still writes to
> the socket so all results after that is one read behind. That's the
> reason why the client responses appears to be mixed up, when
> using the pool, because they share the connections.

One thing you can do is to flush the socket of all pending data when
releasing it back to the pool, and before allowing a new thread to use it.
That way, there is no unread data shared between connections.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive