HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)

CPI-C Calls
Receive (cmrcv)
Chapter 3198
Receive (cmrcv)
The Receive call receives any data that is currently available from the
partner program.
If no data is currently available and the receive type (set by the
Set_Receive_Type call) is set to CM_RECEIVE_AND_WAIT, the local
program waits for data to arrive. If the receive type is set to
CM_RECEIVE_IMMEDIATE, the local program does not wait.
For Windows If the Receive call is issued in nonblocking mode (specified by a previous
Set_Processing_Mode call), the application can issue the following calls
while Receive is outstanding:
Request_To_Send
Send_Error
Test_Request_to_Send_Received
Cancel_Conversation
Deallocate
If the application uses one of these calls in nonblocking mode while the
Receive call is outstanding, it must use Specify_Windows_Handle to
enable CPI-C to return the results of nonblocking calls. It must not issue
Wait_For_Conversation if another call is outstanding in addition to
Receive; the results of this call are undefined if more than one call is
outstanding on the same conversation.
End of Section How a Program Receives Data
The process for receiving data is as follows:
The local program issues a Receive call until it finishes receiving a
complete unit of data. The local program may need to issue the
Receive call several times in order to receive a complete unit of data.
The
data_received
parameter indicates whether the receipt of data
is finished.
The data received can be any of the following:
One data record transmitted in a mapped conversation