|
|
|
|
A Simple Mapped Conversation shows an example of a simple mapped conversation showing the APPC verbs used to start a conversation, exchange data, and end the conversation. The arrow indicates the flow of data. All primary_rc values are AP_OK unless shown otherwise.
The characters MC_ at the beginning of many of the verbs stand for mapped conversation. Parameters and results of APPC verbs are in parentheses.
To start a conversation, the invoking TP issues the following verbs:
TP_STARTED, which identifies the application to SNAP-IX 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. SNAP-IX 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.
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.
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 Confirmation Processing and Conversation States.
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.
To end a conversation, one of the TPs issues the MC_DEALLOCATE verb, which causes APPC to deallocate the conversation between the two TPs.
After this conversation is deallocated, each TP either issues another [MC_]ALLOCATE or RECEIVE_ALLOCATE verb to start another conversation (with this or another partner TP), or issues the TP_ENDED verb.
A TP can participate in multiple conversations simultaneously. In this case, the TP issues the TP_ENDED verb when all conversations have been deallocated.
|
|
|
|
|