The ClientASK protocol detects that a server bound to it is no longer connected as follows:
The client infers that the server connection has failed. It does this, by keeping track of the time of the last activity on the connection.
If no messages are sent to, or are received from, the server within a specific time interval (specified in the clientASKActivityTimeout property), the client determines if the server is still connected.
The client sends an askPing request to the server.
When the server receives an askPing request, it must send an askPing response message to the client, regardless of the current state of the connection.
When the client receives an askPing response, it updates the timestamp of the connection.
If the client does not receive a message from the server within a specific time interval (specified in the clientASKResponseTimeout property), the client will deem the connection to be in failure, and take action as if a fatal communication error has occurred. This may disconnect the socket.
Note that the client does not take action unless both the activity and response timers expire.