HP-UX SNAplus2 R7 APPC Programmer's Guide
Concepts
A Simple Mapped Conversation (half-duplex)
Invoking TP Flow Invoked TP
MC_RECEIVE_AND_WAIT (what_rcvd =
AP_DATA_COMPLETE
)
MC_RECEIVE_AND_WAIT (primary_rc
=
AP_DEALLOC_NORMAL)
TP_ENDED
The characters MC_ at the beginning of many of the verbs stand for mapped conversation. Parameters and results
of APPC verbs are in parentheses.
1.2.1 Starting a Conversation
To start a conversation, the invoking TP issues the following verbs:
• TP_STARTED, which identifies the application to SNAplus2 APPC as an invoking TP
• MC_ALLOCATE, which requests that APPC establish a conversation between the invoking TP and the invoked
TP
The invoked TP issues the RECEIVE_ALLOCATE verb, which informs APPC that the invoked TP is ready to begin
a conversation. SNAplus2 associates the RECEIVE_ALLOCATE verb with the MC_ALLOCATE verb issued by
the invoking TP in order to establish the conversation between the two TPs.
1.2.2 Sending Data
The MC_SEND_DATA verb supplies application data to be transmitted to the partner TP. This data is held in the
local LU’s send buffer; it is not transmitted to the partner TP until one of the following events occurs:
• The send buffer fills up.
• The TP issues a verb that forces APPC to flush the buffer (send data to the partner TP).
In addition to the data, the send buffer also contains the MC_ALLOCATE request (which precedes the data). In
this example, the MC_DEALLOCATE verb flushes the buffer, transmitting the MC_ALLOCATE request and data
to the partner TP. Other verbs that flush the buffer are MC_CONFIRM and MC_FLUSH.
1.2.3 Receiving Data
The MC_RECEIVE_AND_WAIT verb receives data from the partner TP. If no data is currently available, the local
TP waits for it to arrive.
As well as receiving data, the verb may receive a status indicator from the partner TP (such as an indication that
the conversation is ending, a request to confirm receipt of data, and so on). For more information about how the
TP handles these indicators, see Section 1.3, Confirmation Processing (half-duplex) and Section 1.5, Conversation
States (half-duplex).
In the example, the invoked TP issues the first MC_RECEIVE_AND_WAIT verb to receive data.
When it has finished receiving the complete data record (what_rcvd=
AP_DATA_COMPLETE), it issues the
MC_RECEIVE_AND_WAIT verb again to receive a return code. The return code
AP_DEALLOC_NORMAL indicates
that the conversation was deallocated.
The MC_RECEIVE_IMMEDIATE verb performs the same function as the MC_RECEIVE_AND_WAIT verb,
except that it does not wait if data is not currently available from the partner TP. Instead, it returns a no-data-
available response to the calling TP.
24