>
> I have this "guard" mechanism implemented in several of my application. It
> is also implemented in many other application. Basically you write a 
> second
> independent application which monitor the main application. Exactly what
> monitoring means depends on the application. In your case, you would 
> simply
> connect to the main application and the disconnect. If the guard detect a
> problem, it restart the main application. The guard may also kill the main
> application when it doesn't respond anymore. And of course it also has to
> check for the main application existence in the task list.
>

Francois thank you for your advice.

Your suggestion is good in keeping up the service.  On the other hand I 
would like to debug what the root cause of the problem is.  Therefore I want 
to have a mechanism to maintain the availability of the listening socket (by 
the application itself).  If this is guaranteed and the problem persist, 
then I can put my eyes to other parts.

Back to implementation, is there a way to do these steps:
1. Periodically check the state of TWSocket
2. If it is not listening, put it to listen again
3. If no response from TWSocket, destroy it and create a new instance

Thanks for your help

Best regards,
Patrick 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to