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 /


OTSetNonBlocking

Sets a provider to return with an error if it cannot immediately complete a function.

C INTERFACE
OSStatus OTSetNonBlocking(ProviderRef ref);
C++ INTERFACE
OSStatus TProvider::SetNonBlocking();
PARAMETERS
ref
The provider reference of the provider whose blocking mode is being set.
function result
An error code. See Appendix B for more information.
DISCUSSION
For a full description of the effect of this call, see "Setting a Provider's Blocking Status".

The OTSetNonBlocking function causes provider functions to return a result code immediately, instead of waiting for a function to complete. When you open a provider, its mode of operation is set to nonblocking by default.

If a provider is in nonblocking mode and you call the OTCloseProvider function, the provider flushes all outgoing commands in the stream and immediately closes the provider. Conversely, in blocking mode, the provider would give each STREAMS module up to 15 seconds to deal with outgoing data.

To set a provider's blocking status to blocking, call the OTSetBlocking function. To find out a provider's current blocking mode, call the OTIsNonBlocking function.

SEE ALSO
"Setting a Provider's Blocking Status".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998