Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Jan : TCPServer that does not destroy its TIdTCPConnections

www.cryer.info
Managed Newsgroup Archive

TCPServer that does not destroy its TIdTCPConnections

Subject:TCPServer that does not destroy its TIdTCPConnections
Posted by:"Offir Bakshitz" (nospam)
Date:Sun, 16 Jan 2005 12:39:41

Hi all, I would appretiate an advise:
I need to develop a TCP Server that does not free (nor disconnect) the
socket connection it made with the client, eventhough the client-thread
itself should terminate.
In Indy 9 I created a "TMyListenerThread" that inherited from TIdPeerThread
and overriden AfterRun(), CleanUp() methods so that the "connection" object
(of type TIdTCPConenction) would not be freed or disconnected. (I saved
those connection objects in a list and worked with them)
when I created an object of type TIdTCPServer I did:
TCPListenerServerObject.ThreadClass := TMyListenerThread;
And that solved my problem.
However, Indy10 changed too many thing: TIdContext instead of TIdPeerThread
and the scheduler instead of the threads manager.
So I need a more scalable solution to my problem, such that will not require
re-coding when Indy11 will come out.
Thanks, Offir.

Replies:

www.cryer.info
Managed Newsgroup Archive