OTRcvConnect
Reads the status of an outstanding or completed asynchronous call to theOTConnectfunction.C INTERFACE
OSStatus OTRcvConnect(EndpointRef ref, Tcall* call);C++ INTERFACE
OSStatus TEndpoint::RcvConnect(TCall* call);PARAMETERS
ref- The endpoint reference of the endpoint initiating the connection.
call- A pointer to a
TCallstructure (page 3-62) that contains information about the newly established connection. When theOTRcvConnectfunction returns, it fills in this structure. You can set this parameter tonil, in which case no information is returned to you.DESCRIPTION
You call theOTRcvConnectfunction to determine the status of a previously issuedOTConnectcall. If you want to retrieve information about the connection, you must allocate buffers for theaddrfield and, if required, theoptandudatafields before you make the call.If the endpoint is synchronous and blocking, the
OTRcvConnectfunction waits for the connection to be accepted or rejected. If the connection is accepted, the function returns with akOTNoErrorresult. If the connection is rejected, the function returns with akOTLookErrresult. In this case, you should call theOTLookfunction to verify that aT_DISCONNECTevent is the reason for thekOTLookErr, and then you should call theOTRcvDisconnectfunction to clear
the event.If the endpoint is asynchronous or nonblocking, the
OTRcvConnectfunction returns with thekOTNoDataErrresult if the connection has not yet been established.VALID STATES
T_OUTCONSEE ALSO
You use theOTConnectfunction (page 3-121) to request a connection request.You use the
TCallstructure (page 3-62) to store information about the newly established connection.You use the
OTLookfunction (page 3-85) to retrieve pending asynchronous events.You use the
OTRcvDisconnectfunction (page 3-151) to acknowledge that your request for a connection has been rejected.For information on how to use this function with a TCP/IP protocol, see page 8-17 in the TCP/IP chapter.
For information on how to use this function with AppleTalk protocols, see page 13-10 in the ADSP chapter and page 15-10 in the PAP chapter.
You examine the
connectfield of theTEndpointInfostructure (page 3-48) to determine whether your endpoint supports the sending of data with a connection request.