Search code examples
delphiclientdelphi-2009indy

Server AContexts List with Indy10


I'm using Indy10 under Delphi2009. I have a server/client application, with TidTCPServer and TidTCPClient. I found a problem in my "logical" code.

This is : When the server disconnect, and after a time, reconnect, the sent-clients requests are not intercepted by the server, and the server cannot contact client (because-I think- the acontext list is empty)

So how can I alert the clients that the server reconnected, or how can the server recreate its acontext list? (because the solution where the clients verify each x seconds the connection of the server is not a real good solution ?!!!).


Solution

  • You really need to implement a heartbeat into your protocol, if you want to do that.

    Here is a question that was asked before that is similar to yours Do I need to heartbeat to keep a TCP connection open?