NSConnection Issue
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