OTRcvOrderlyDisconnect
Acknowledges a request for an orderly disconnect.C INTERFACE
OSStatus OTRcvOrderlyDisconnect(EndpointREf ref);C++ INTERFACE
OSStatus TEndpoint::RcvOrderlyDisconnect();PARAMETERS
ref- The endpoint reference of the endpoint acknowledging receipt of the disconnect request.
DESCRIPTION
TheOTRcvOrderlyDisconnectfunction is a service that is not supported by all protocols. If it is, theservtypefield of theTEndpointInfostructure has the valueT_COTS_ORDorT_TRANS_ORDfor the endpoint.After using the
OTRcvOrderlyDisconnectfunction to acknowledge receipt of a disconnection request, there will not be any more data to receive. Calls to theOTRcvfunction (for a transactionless connection) or to theOTRcvRequestfunction (for a transaction-based connection) after acknowledging a disconnection request fail with thekOTOutStateErrresult. If the endpoint supports a remote orderly disconnect, you can still send data over the connection if you have not yet called theOTSndOrderlyDisconnectfunction.The
OTRcvOrderlyDisconnectfunction behaves in the same way in all modes of operation. If there is no disconnection request pending, the function returns with thekOTNoReleaseErrresult. It there is a disconnection request pending, the function returns either thekOTNoErrororkOTBufferOverflowErrresult. In the latter instance, you need to check thedisconfield of theTEndpointInfostructure for your endpoint and make sure that the buffer referenced by theudata.buffield is at least as big as the value specified for thedisconfield.VALID STATES
T_DATAXFER,T_OUTRELSEE ALSO
You use theOTSndOrderlyDisconnectfunction (page 3-153) to send an orderly disconnect.For information on abortive and orderly disconnects see "Terminating a Connection," beginning on page 3-30.
You examine the
TEndpointInfostructure (page 3-48) to determine whether the endpoint supports orderly release.