Groups | Blog | Home
all groups > dotnet remoting > february 2005 >

dotnet remoting : Detecting Server Disconnect


kiewicz
2/22/2005 7:03:03 PM
I'm a senior in college taking a software development class. We're making a
game, and I'm in charge of the networking.

I'm using RemotingServices to get a reference to a remote object from the
other side. Both sides get a reference from each other. I created a thread
to call a blank function on the remote object to detect if the other side
disconnected without warning. Unfortunately, when you unplug one of the
computers from the network, the other side calls the blank function and waits
patiently for it to return.

I've tried changing the RemotingConfiguration so the lease time is shorter,
but that doesn't help.

Sunny
2/23/2005 11:38:16 AM
In article <DB5187C5-74F1-4FD1-AD81-818D2E2C7CEC@microsoft.com>,
kiewicz@discussions.microsoft.com says...
[quoted text, click to view]

Create a local delegate to the remote method, and call BeginInvoke on
that delegate, with timeout which you need.

I have posted a sample in the past, here is archive:
http://www.tech-
archive.net/Archive/DotNet/microsoft.public.dotnet.framework.remoting/20
04-02/0445.html

AddThis Social Bookmark Button