Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking With Open Transport / Part 2 - Open Transport Reference
Chapter 21 - Providers Reference / Functions
Controlling a Provider's Modes of Operation /


OTCancelSynchronousCalls

Cancels any currently executing synchronous function for a specified provider.

C INTERFACE
OSStatus OTCancelSynchronousCalls(ProviderRef ref, OSStatus err);
C++ INTERFACE
void TProvider::CancelSynchronousCalls(OSStatus err);
PARAMETERS
ref
The provider reference for the provider whose synchronous functions you want to cancel.
err
The error code value to be returned to the synchronous caller, typically kOTCanceledErr.
function result
For the C interface, kEBADFErr is returned if the reference is invalid. The function can also return kOTOutStateErr if the endpoint is closed.
DISCUSSION
The OTCancelSynchronousCalls function cancels any currently executing synchronous function for the provider that you specify. The provider need not be in synchronous mode when you call this function.

Typically, you would call the OTCancelSynchronousCalls function to prevent a synchronous function from hanging the system. You can make the call at interrupt time by installing a Time Manager task that executes after a given amount of time has passed. You can also call this function from the provider's notifier after getting a kOTSyncIdleEvent after a timeout.

IMPORTANT
The OTCancelSynchronousCalls function may cause a provider to be unusable. Typically, once this call is made, the only thing you can do with the provider is close it. For example, calling the OTCancelSynchronousCalls function on a connection-oriented endpoint might break its connection and render the endpoint unusable.
SEE ALSO
Timer tasks are described in the chapter "Utitlities Reference".

"Specifying How Provider Functions Execute".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998