Important: The information in this document is obsolete and should not be used for new development.
OTRcvDisconnect
Identifies the cause of a connection break or of a connection rejection and clears the corresponding disconnection event.C INTERFACE
OSStatus OTRcvDisconnect(EndpointRef ref, TDiscon* discon);C++ INTERFACE
OSStatus TEndpoint::RcvDisconnect(TDiscon* discon);PARAMETERS
ref
- The endpoint reference of the endpoint receiving the disconnection request.
discon
- A pointer to a
TDiscon
structure that is filled ou;with disconnection data, a reason for the disconnection, and a connection request sequence number.- function result
- An error code. See Discussion.
DISCUSSION
Calling theOTRcvDisconnect
function clears the corresponding disconnection event and retrieves any user data sent with the disconnection.If you do not care about data returned with the disconnection and do not need to know the reason for the disconnection nor the sequence ID, you may specify a
NULL
pointer for thediscon
parameter. In this case, the provider discards any user data associated with the disconnection.The
OTRcvDisconnect
function behaves in the same way for all modes of operation. If there is no disconnection request pending, the function returns with thekOTNoDisconnectErr
result. If there is a disconnection request pending, the function returns either thekOTNoError
orkOTBufferOverflowErr
result. In the latter instance, you did not supply a buffer that was large enough to hold the disconnection data.SEE ALSO
TheOTSndDisconnect
function.