Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSConnectionDidDieNotification?



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@hidden
-----------------------------------------------

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.