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
TDisconstructure 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 theOTRcvDisconnectfunction 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
NULLpointer for thedisconparameter. In this case, the provider discards any user data associated with the disconnection.The
OTRcvDisconnectfunction behaves in the same way for all modes of operation. If there is no disconnection request pending, the function returns with thekOTNoDisconnectErrresult. If there is a disconnection request pending, the function returns either thekOTNoErrororkOTBufferOverflowErrresult. In the latter instance, you did not supply a buffer that was large enough to hold the disconnection data.SEE ALSO
TheOTSndDisconnectfunction.
 
  
  
  