HP-UX SNAplus2 R7 APPC Programmer's Guide

APPC Conversation Verbs
MC_RECEIVE and RECEIVE Verbs
Note
The [MC_]RECEIVE_EXPEDITED_DATA verb also receives data from the partner TP,
but it receives data that was sent as expedited ow data rather than normal ow data. This
verb is described separately after the other RECEIVE verbs.
4.9.1 How a TP Receives Data
The process through which the local TP receives data is as follows:
1. The local TP issues a receive verb until it nishes receiving a complete unit of data. The data received can be
any of the following:
One data record transmitted in a mapped conversation
One logical record transmitted in a basic conversation
A buffer of data received independent of its logical-record format in a basic conversation
The local TP may need to issue several RECEIVE verbs in order to receive a complete unit of data. Once a
complete unit of data has been received, the local TP can manipulate it.
2. The local TP issues another receive verb. This has one of the following effects:
If the partner TP has sent more data, the local TP begins to receive a new unit of data.
If the partner TP has nished sending data or is waiting for conrmation, status information (available through
the
what_rcvd parameter) indicates the next action the local TP normally takes. For more information, see
Section 4.9.2, The what_rcvd Parameter.
Alternatively, the local TP can set a parameter rtn_status when issuing the receive verb; this indicates that any status
information available is to be returned with the data. In this case, the receive verb that returns the last part of the
data also returns the status information, and the local TP does not need to issue a separate receive verb for it. For
more information, see Section 4.9.2, The what_rcvd Parameter.
4.9.2 The what_rcvd Parameter
After issuing one of the [MC_]RECEIVE verbs, a TP will normally use the what_rcvd parameter to determine its
next action. The values referring to a data type of User Control will be returned on a mapped conversation on the
HP-UX system, and the values referring to a data type of PS Header will be returned on a mapped conversation
on the HP-UX system with a synchronization level of
AP_SYNCPT.
The following list describes the possible values of the what_rcvd parameter, with the action normally taken by the
TP for each of them:
AP_DATA, AP_DATA_COMPLETE, AP_DATA_INCOMPLETE,
AP_USER_CONTROL_DATA_COMPLETE, AP_USER_CONTROL_DATA_INCMP,
AP_PS_HEADER_COMPLETE, AP_PS_HEADER_INCOMPLETE
The local TP received data from the partner TP. It will normally continue to issue RECEIVE verbs until it
receives one of the other what_rcvd parameters in this list.
AP_SEND (half-duplex conversation only)
The partner TP issued the [MC_]PREPARE_TO_RECEIVE verb without requesting conrmation, or issued
the [MC_]SEND_DATA verb with a send type of PREPARE_TO_RECEIVE. The local TP is now in Send
state, so it will normally begin to send data.
AP_CONFIRM_DEALLOCATE (half-duplex conversation only)
The partner TP issued the [MC_]DEALLOCATE verb with a dealloc_type parameter indicating that
conrmation was required, or issued the [MC_]SEND_DATA verb with a send type of DEALLOCATE.
158