FROM : Tom Harrington
DATE : Fri Jul 21 00:12:42 2006
On 7/20/06, Mike Kobb <<email_removed>> wrote:
> If this is covered someplace in Apple's docs, please point me there.
> I've looked and looked.
>
> I'm using Distributed Objects to communicate between two Cocoa apps.
> It all seems to work very well. My "server" app vends an object by
> registering an NSProtocolChecker with the default NSConnection, and
> the client gets the object just fine.
>
> Here's what I couldn't find in the documentation. Let's say that the
> server needs to shut down. Is there some graceful way for it to do
> so to ensure that connected clients know that it has gone away, and
> can stop trying to use the object that was vended?
With the default NSConnection you can register for
NSConnectionDidDieNotification and take appropriate steps.
If you're using some other NSConnection (say one that uses an
NSSocketPort) then you're out of luck, and the best you can do is
catch exceptions when they happen.
--
Tom Harrington
<email_removed>
AIM: atomicbird1
DATE : Fri Jul 21 00:12:42 2006
On 7/20/06, Mike Kobb <<email_removed>> wrote:
> If this is covered someplace in Apple's docs, please point me there.
> I've looked and looked.
>
> I'm using Distributed Objects to communicate between two Cocoa apps.
> It all seems to work very well. My "server" app vends an object by
> registering an NSProtocolChecker with the default NSConnection, and
> the client gets the object just fine.
>
> Here's what I couldn't find in the documentation. Let's say that the
> server needs to shut down. Is there some graceful way for it to do
> so to ensure that connected clients know that it has gone away, and
> can stop trying to use the object that was vended?
With the default NSConnection you can register for
NSConnectionDidDieNotification and take appropriate steps.
If you're using some other NSConnection (say one that uses an
NSSocketPort) then you're out of luck, and the best you can do is
catch exceptions when they happen.
--
Tom Harrington
<email_removed>
AIM: atomicbird1
| Related mails | Author | Date |
|---|---|---|
| Mike Kobb | Jul 20, 23:35 | |
| Tom Harrington | Jul 21, 00:12 | |
| Mike Kobb | Jul 21, 03:04 | |
| Tom Harrington | Jul 21, 05:18 | |
| Michael Ash | Jul 21, 05:28 | |
| Mike Kobb | Jul 21, 19:37 |






Cocoa mail archive

