Re: Endpoint state - T_OUTCON
Re: Endpoint state - T_OUTCON
- Subject: Re: Endpoint state - T_OUTCON
- From: Quinn <email@hidden>
- Date: Tue, 27 Jan 2004 10:52:14 +0000
At 19:22 +0300 19/1/04, Igor garnov wrote:
1) Using Open Transport, if I call OTConnect in asynchronous mode, I
use my notifier function to be informed when this call succeeds or
fails.
But what if during my asynchronous waiting I have to destroy the
endpoint on which I have called OTConnect?
I call OTGetEndpointState, and it returns T_OUTCON.
What actions should I perform to correctly shutdown this endpoint
without having to wait for this (possibly) lengthy operation to
complete?
2) If I issue OTConnect in asynchronous mode and then call
OTRemoveNotifier and OTSetSynchronous for the endpoint (because I
have to close down, for example), will it cause some error? Is this
approach incorrect in some way?
Generally what I do in both of these cases is to just call
OTCloseProvider. While OTSndDisconnect is actually a valid way to
cancel an outgoing connection (for case 1 above), doing this
complicates the code for no real benefit. You can be sure that, once
OTCloseProvider returns, your notifier will no longer be called.
S+E
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.