How to remove delegate from Invocation List? (remote eventing)

L

Lex

I have an app that allows for cross process eventing. I have a server
that instantiates a shared object that external processes can remotely
get a refernce to and register for events.

The problem I have is when one of the clients die uncleanly without
unregistering for the event. The remote object does not know that the
client is gone an still tries to call the delegate for that client.
This results in a socket exception after a few seconds.

Is there a clean way to deal with this? Is there a way to have the
remote object remove the dead client's delegate from the event's
Invocation list if it fails with a given exception?

Regards
 
G

Guest

IIRC, Chris Sells has an excellent essay on cross-process events & delegates that should point you in the right direction... I believe it's on his website (sellsbrothers.com) as well as being included in his book, Windows Forms Programming in C#.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top