OTUnbind
Dissociates an endpoint from its address or cancels an asynchronous call to theOTBindfunction.C INTERFACE
OSStatus OTUnbind(EndpointRef ref);C++ INTERFACES
OSStatus TEndpoint::Unbind();PARAMETERS
ref- The endpoint reference of the endpoint that you are unbinding.
DESCRIPTION
If you call theOTUnbindfunction asynchronously and you have not installed a notifier function, the only way to determine that the endpoint has been unbound is to use theOTGetEndpointStatefunction to poll the state of the endpoint. The function returns thekOTStateChangeErrresult when theOTUnbindfunction returns. If the function succeeds, the state of the endpoint isT_UNBND. If it fails, its state isT_IDLE.After you unbind an endpoint, you can no longer use it to send or receive information. You can use the
OTCloseProviderfunction to deallocate memory reserved for the endpoint, or you can use theOTBindfunction to associate it with another address and then resume transferring data or establishing a connection.SPECIAL CONSIDERATIONS
In asynchronous mode, the endpoint provider might call your notifier function before the function's initial return.VALID STATES
T_IDLECOMPLETION EVENT CODES
T_UNBINDCOMPLETE0x20000002 The OTUnbindfunction has completed. Thecookieparameter of the endpoint's notifier function is not used.SEE ALSO
To bind an endpoint, use theOTBindfunction, described on page 3-77.To obtain information about the endpoint's state, use the
OTGetEndpointStatefunction, described on page 3-83.The
OTCloseProviderfunction is described in the chapter "Providers" in
this book.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help