views:

136

answers:

1

Hi,

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 ?!!!).

+1  A: 

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 http://stackoverflow.com/questions/865987/do-i-need-to-heartbeat-to-keep-a-tcp-connection-open

Robert Love