Skip navigation.
 
mlNSConnectionDidDieNotification?
FROM : Eric Shapiro
DATE : Thu Sep 30 22:12:47 2004

I'm trying to receive an NSConnectionDidDieNotification when one side
of an NSConnection dies, but I never see that notification.

I am using the following to create a server:

NSConnection *conn = [[NSConnection alloc]init];
[conn registerName:@"MyServerName]

and on the client side:

NSConnection *conn = [NSConnection
  rootProxyForConnectionWithRegisteredName:@"MyServerName host:nil]

The code to register for the notification is roughly:

  [[NSNotificationCenter defaultCenter] addObserver:self
    selector:@selector(connectionDied:)
    name:NSConnectionDidDieNotification
    object: conn]

If I kill the client or server, the other side never receives
notification.

There is a note about NSConnectionDidDieNotification not working for
NSSocketPorts, but a check of my NSConnection shows that it is using
NSMachPorts.

Suggestions?

  Thanks,
  Eric Shapiro

-----------------------------------------------
Eric Shapiro                <email_removed>
-----------------------------------------------

Related mailsAuthorDate
No related mails found.