• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSConnectionDidDieNotification?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSConnectionDidDieNotification?


  • Subject: NSConnectionDidDieNotification?
  • From: Eric Shapiro <email@hidden>
  • Date: Thu, 30 Sep 2004 16:12:47 -0400

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:
This email sent to email@hidden


  • Prev by Date: Re: Cocoa, Quartz, Colorspaces and ColorSync
  • Next by Date: Re: NSImage in a NSMenuItem?
  • Previous by thread: Re: setObjectForKey in NSMutableDictionary in Java
  • Next by thread: [ANN] Smalltalk style Blocks and iterators
  • Index(es):
    • Date
    • Thread