Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Closing an IOUserClient



On Dec 19, 2007, at 11:22 AM, Duane Murphy wrote:

SimpleUserClient works just fine when the user side closes the
connection. I want to close the connect _from_ the provider.

That is, the provider is tracking user clients and has determined that
the user client needs to be closed, what do I do?

I am having some luck with terminate() but some things still seem like
they are not working correctly.

In the provider, if (userClient->terminate(this, options)) ...

Your userclient must maintain its own state and + retain count while it's being torn down in phases. This means the user-space clients watch for their service being terminated, and close their connections immediately. The userclient should delay its teardown during didTerminate(), and call that function itself once all clients have been closed, which will then cause the stop thread to be scheduled.

~HTH
--
Shaun Wexler
MacFOH
http://www.macfoh.com


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

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

References: 
 >Closing an IOUserClient (From: "Duane Murphy" <email@hidden>)
 >Re: Closing an IOUserClient (From: "Duane Murphy" <email@hidden>)
 >Re: Closing an IOUserClient (From: Garth Cummings <email@hidden>)
 >Re: Closing an IOUserClient (From: "Duane Murphy" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.