Board index » delphi » TCPServer that does not destroy its TIdTCPConnections
Offir Bakshitz
Delphi Developer |
TCPServer that does not destroy its TIdTCPConnections2005-01-16 06:39:41 PM delphi120 Hi all, I'd 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. |