OTSetNonBlocking
Does not allow a provider to wait if it cannot currently complete a function that sends or receives data.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.
DESCRIPTION
TheOTSetNonBlockingfunction causes provider functions to return a result code immediately, instead of waiting for a function that sends or receives data 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
OTCloseProviderfunction, the provider flushes all outgoing commands in the stream and immediately close the provider. Conversely, in blocking mode, the provider would give each Streams module up to 15 seconds to flush outgoing commands. It is recommended that you call theOTSetNonblockingfunction before you call theOTCloseProviderfunction.SEE ALSO
Blocking is described in "Setting a Provider's Blocking Status" on page 2-10.To set a provider's blocking status to blocking, call the
OTSetBlockingfunction, (page 2-32). To find out a provider's blocking status, call theOTIsNonBlockingfunction (page 2-35).Blocking attributes affect endpoint providers more than other providers. For more information, see the discussion about modes of operation in the chapter "Endpoints" in this book.