Re: Closing an IOUserClient
Re: Closing an IOUserClient
- Subject: Re: Closing an IOUserClient
- From: Shaun Wexler <email@hidden>
- Date: Wed, 19 Dec 2007 17:02:59 -0800
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:
This email sent to email@hidden