Wednesday, 21 August 2013

Is it possible to find out that a remote programm is closed

Is it possible to find out that a remote programm is closed

I use NetTcpBinding to communicate between multiple PCs. Allcan act as
equal servers, they connect from time to time with each other.
At the moment I connect additional from time to time to see wether remote
program is alive. It is wished that immediatly if remote program is
stopped (shut down, forcefully terminated, connection is down, ...) on one
PC tha information is given to user on other pcs (not over the
configurable interval used now, but really immidiate).
The Faulted state is used, but is only catching Faults if the
communication is activilly used (it didn't see an error if nothing is done
with the connection on a client, and the server is forcefully shut down
with task manager).
Is there any possibility to see if the remote programm is closed without
explizitly calling a method on the remote host? A sort of : connect to
other programm and keep connection always on, report if connection is shut
down?
Is there a pattern to use like: "IF RemoteProgramm is not alive THEN throw
Exception/Fault"

No comments:

Post a Comment