Handling NSConnection death gracefully
Handling NSConnection death gracefully
- Subject: Handling NSConnection death gracefully
- From: Dan Bernstein <email@hidden>
- Date: Sun, 10 Apr 2005 00:32:26 +0300
I have a Distributed Objects "server" object that receives various
objects over NSConnections. Whenever it gets an object it "cares"
about (e.g. an object that gets assigned to an ivar) it wants to be
notified when that object's connection dies. This is easy: register
for NSConnectionDidDieNotification. The problem is, when the
notification comes, there's no direct way to know why the server
registered for it, i.e. which objects that it "cares" about are
affected by the connection's death.
My current idea is to go over [[deathNotification object]
remoteObjects] and for each one check (by pointer comparison) if it's
one of the objects I care about.
I'm looking for a neater solution.
Thanks,
-- Dan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden