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 22 - Endpoints Reference / Functions
Tearing Down a Connection /


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 the OTRcvDisconnect 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 the discon 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 the kOTNoDisconnectErr result. If there is a disconnection request pending, the function returns either the kOTNoError or kOTBufferOverflowErr result. In the latter instance, you did not supply a buffer that was large enough to hold the disconnection data.

SEE ALSO
The OTSndDisconnect function.

"TCP/IP Services".

"AppleTalk Reference".

"Terminating a Connection".

Table 4-4.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998