find out if client is connected / server is reachable



I have a Remoting client and a remoting Server. The Remoting client is
a long running process that every once in a while calls the remoting
server. How do I ideally find out if the Server has diconnected from
the client? I was thinking of making the client call some simple ping
method on the Server every minute or so. In case it throws an Exception
, I know the Server is not reachable and I can set client.Connected =
false. However it seems that in case the server is not reachable the
call to server.Ping() doesn't return for a very long time and blocks. I
could of course call the Ping() in an extra thread an kill that thread
if the method hasn't returned after a predefined timeperiod and the
define client.Connected = false. Bu that doesn't feel right. There must
be a proper way (best practise) in .NET Remoting how determine the
connection state.

.



Relevant Pages

  • Re: how to implement pinging
    ... calls a method on a remoting server. ... Run the ping in a separate thread so it does not lock up your GUI ... one thread for each ping and each remoting client? ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: how to implement pinging
    ... calls a method on a remoting server. ... Run the ping in a separate thread so it does not lock up your GUI ... one thread for each ping and each remoting client? ...
    (microsoft.public.dotnet.framework.remoting)
  • RE: Need advise on concept ???
    ... Machine information are based on alarms (imagin your ca with a red ... remoting, messaging etc - I think your time might be better spent by ... each could be hosted in a server cluster (fronted by a load ... id on the appropriate IServerPlugIn assembly/class and then execute the ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Events in .Net Remoting
    ... I am writing with respect to the Events in .Net Remoting that I had ... another channel for the callbacks..both on client side. ... Then I force a method on the server end (through a GUI control on the ... >> the regular client side requests still work fine. ...
    (microsoft.public.dotnet.framework.remoting)
  • RE: Need advise on concept ???
    ... each could be hosted in a server cluster (fronted by a load ... provided methods for remoting. ... At the server, a message dispatcher service would receive the remoting call, ... id on the appropriate IServerPlugIn assembly/class and then execute the ...
    (microsoft.public.dotnet.distributed_apps)