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

Re: NSConnection Issue


  • Subject: Re: NSConnection Issue
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Tue, 22 Jul 2008 22:07:32 -0700


On Jul 22, 2008, at 9:54 PM, Patrick Walker wrote:

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.

AFAIK you just have to try connecting if you're using NSSocketPort. Have you tried using -[NSConnection setRequestTimeout:]? I have a comment in some of my code which indicates that the default timeout is really long.


--
Adam

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: Ken Thomases <email@hidden>
References: 
 >NSConnection Issue (From: Patrick Walker <email@hidden>)

  • Prev by Date: Core Audio Memory Leak
  • Next by Date: Returning exactly what has been promised
  • Previous by thread: NSConnection Issue
  • Next by thread: Re: NSConnection Issue
  • Index(es):
    • Date
    • Thread