HP-UX SNAplus2 R7 APPC Programmer's Guide
Concepts
Sending and Receiving Status with Data (half-duplex)
1.3.3 Receiving Data and a Confirmation Request
The what_rcvd parameter of the MC_RECEIVE_AND_WAIT verb indicates the following:
• Status of the data received is complete or incomplete
• Future processing expected of the local TP (for example, a confirmation request or an indication that it should
begin to send data)
When the invoked TP finishes receiving the complete data record (what_rcvd =
AP_DATA_COMPLETE
), it issues the
MC_RECEIVE_AND_WAIT verb again and receives a confirmation request (what_rcvd =
AP_CONFIRM).
1.3.4 Responding to the Confirmation Request
The invoked TP normally issues the MC_CONFIRMED verb to confirm receipt of data; this frees the invoking TP
to resume processing.
If the invoked TP has detected an error in the received data, it can instead issue the MC_SEND_ERROR verb to
indicate this error condition.
1.3.5 Deallocating the Conversation
The MC_DEALLOCATE verb sends a confirmation request with the data when both of the following conditions
are true:
• The conversation’s synchronization level (established by the sync_level parameter of the MC_ALLOCATE verb)
is
AP_CONFIRM_SYNC_LEVEL.
• The dealloc_type parameter of the MC_DEALLOCATE verb is set to
AP_SYNC_LEVEL.
The what_rcvd parameter of the final MC_RECEIVE_AND_WAIT verb issued by the invoked TP contains
AP_CONFIRM_DEALLOCATE, indicating that a confirmation of receipt of data is required before APPC will deallocate
the conversation. The invoking TP waits for this confirmation until the invoked TP issues the MC_CONFIRMED
verb to indicate that data was received successfully (or it could instead issue the MC_SEND_ERROR verb to indi-
cate that data was not received successfully).
1.4 Sending and Receiving Status with Data (half-duplex)
In Table 1–2, Confirmation Processing, the invoking TP used the MC_SEND_DATA verb to send data and then
the MC_CONFIRM verb to request confirmation from the invoked TP. It is possible to use a parameter on the
[MC_]SEND_DATA verb to indicate that APPC should also perform the function of the [MC_]CONFIRM verb
(or [MC_]DEALLOCATE, [MC_]FLUSH, or [MC_]PREPARE_TO_RECEIVE) after sending the data, instead of
having to issue two separate verbs.
Similarly, the invoked TP in Table 1–2, Confirmation Processing issued the MC_RECEIVE_AND_WAIT verb twice,
first to receive the data and then to receive the status information that the invoking TP requested confirmation. It
is possible to use a parameter on any of the [MC_]RECEIVE verbs to indicate that APPC should return status
information about the same receive verb as the data, instead of having to issue two separate receive verbs.
Table 1–3, Receiving Status Information with Data shows the use of the “send type” parameter on
MC_SEND_DATA to perform the function of the MC_CONFIRM verb, and the “return status with data” parameter
on MC_RECEIVE_AND_WAIT to receive status information with data. All primary_rc values can be assumed to
be
AP_OK unless shown otherwise.
27