473,385 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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
Nov 16 '05 #1
1 4786
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#.
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Sharon | last post by:
How to catch an asynchronous delegate invocation exception? The code: --------------------------------------- String message = “my message”; foreach( MyDelegate handler in...
1
by: News-West | last post by:
Hi, I have foolishly got myself caught up in coding a pretty simple app in c#, on the back of very little experience of the language. At the heart of the app, is a remote server, which fires...
3
by: N8 | last post by:
I am trying to get an exception to occur and consequently found that when adding a target method to a delegates invocation list, a copy of that object is added instead of a reference to the object....
1
by: Tom Leylan | last post by:
I'm either passing the wrong thing, comparing the wrong thing or... something else. I have a CSharp base class which is used to fire events and in CSharp I have defined a delegate for the custom...
0
by: kiran napit | last post by:
how do i list remote processses using VC/MFC for a network application.
1
by: Peter Rilling | last post by:
How can I get access to the invocation list for a multicast delegate (i.e. an event) at runtime? Suppose that I have a reference to a class that has an event. I would like to be able to...
3
by: robinhoode | last post by:
I'm trying to serialize my menubar for use later, however I want to use XML to serialize this list. Not a problem with the Text property of the MenuItem control, however the ClickEvent is a bit...
10
by: pamelafluente | last post by:
Hi I have a sorted list with several thousands items. In my case, but this is not important, objects are stored only in Keys, Values are all Nothing. Several of the stored objects (might be a...
2
by: mehdi | last post by:
Hi folks, Consider the following property of a class: public AnotherClass AnotherClassValue { set { if(this.anotherClassInstance != null) this.anotherClassInstance.Changed -= new...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.