• 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
NSConnection Issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSConnection Issue


  • Subject: NSConnection Issue
  • From: Patrick Walker <email@hidden>
  • Date: Wed, 23 Jul 2008 01:54:21 -0300

I was wondering if anyone had any solutions to determine whether or not an NSConnection via NSSocketPorts are still valid without each end polling to see if it still connects? Right now, if the client tries to access the rootObject it hangs. While this may may only happen occasionally, I don't like it when the only solution is to restart the program. I can "live" with this issue if I had to because all I seem to have to ensure is that the server remains up and hardware plugged in.

Is there any equivalent for NSConnectionDidDieNotification and similar notifications that could be gerry-rigged to work on not just NSPort but NSSocketPort? The documentation at the Apple Developer site says that NSConnection has two notifications available for it but unfortunately neither will work if the sockets are of NSSocketPort. It also says that you detect a failure on the next message, but the problem is that whenever I try to send a message, the client locks up.

I've sort of tried using a @try/@catch but the spinning beachball of death isn't generating an exception so I'm not sure what to do.

Anyone have any ideas?

Thanks.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSConnection Issue
      • From: "Adam R. Maxwell" <email@hidden>
  • Prev by Date: Re: Problem on clearing points and paths on a NSView
  • Next by Date: Core Audio Memory Leak
  • Previous by thread: Re: A quick one: Passing a reference/pointer to NSString
  • Next by thread: Re: NSConnection Issue
  • Index(es):
    • Date
    • Thread