Re: find out if client is connected / server is reachable
- From: "Joe Doe" <jgeorge@xxxxxxxxxx>
- Date: Thu, 18 Jan 2007 16:00:41 -0500
The whole purpose of the server is to stay around. The code must be robust
enough to do that. But for the client, you can do leasing with the server
so that the server knows that the client is not there anymore. Checkout
leasing in .Net remoting.
"Robert Ludig" <schwertfischtrombose@xxxxxx> wrote in message
news:1168434085.410078.58450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.
.
- References:
- find out if client is connected / server is reachable
- From: Robert Ludig
- find out if client is connected / server is reachable
- Prev by Date: Re: .NET Remoting - client development/design-time and run-time requirements
- Next by Date: No exception being thrown on dead clients
- Previous by thread: Re: find out if client is connected / server is reachable
- Next by thread: Re: File transfer over remoting channel
- Index(es):
Relevant Pages
|