The Request_To_Send call (function name cmrts) notifies the partner program that the local program wants to send data.
CM_ENTRY Request_To_Send(
unsigned char FAR *conversation_ID,
CM_INT32 FAR *return_code
);
The conversation can be in any of the following states: RECEIVE, SEND, SEND_PENDING, CONFIRM, CONFIRM_SEND, or CONFIRM_DEALLOCATE.
There is no state change.
In response to this request, the partner program can change the conversation to RECEIVE state by issuing one of the following calls:
The partner program can also ignore the request to send.
The conversation state changes to SEND for the local program when the local program receives one of the following values through the status_received parameter of a subsequent Receive call:
The request-to-send notification is received by the partner program through the request_to_send_received parameter of the following calls:
Request-to-send notification is sent to the partner program immediately; CPI-C does not wait until the send buffer fills up or is flushed. Consequently, the request-to-send notification can arrive out of sequence. For example, if the local program is in SEND state and issues the Prepare_To_Receive call followed by the Request_To_Send call, the partner program, in RECEIVE state, can receive the request-to-send notification before it receives the send notification. For this reason, request_to_send can be reported to a program through the Receive call.
Upon receiving a request-to-send notification, the partner LU retains the notification until the partner issues a call that returns request_to_send_received. The LU keeps only one request-to-send notification per conversation. Thus the local program can issue more Request_To_Send calls than are explicitly handled by the partner TP.