HP-UX SNAplus2 R7 APPC Programmer's Guide
Concepts
Changing Conversation States (half-duplex)
1.5.1 The TP’s View of the Conversation
It is the conversation rather than the TP that is in a particular state. A TP may be conducting several conversations,
each of which is in a different state. If a conversation is said to be in Send state, this always means that from the
viewpoint of the local TP, the conversation is in Send state. To the partner TP, the conversation is in another state
(such as Receive).
1.5.2 State Changes
A change in the conversation state occurs on the completion of an APPC verb. The state change can result from
any of the following:
• A verb issued by the local TP (for example, issuing RECEIVE_AND_WAIT in Send state changes the
conversation state to Receive)
• A verb issued by the partner TP (for example, if the partner TP issues the CONFIRM verb, the local TP receives
indication of this on one of the RECEIVE verbs; at this point the conversation changes from Receive to Con
firm
state)
• An error condition
The new state of the conversation generally depends on the primary return code of the completed APPC verb. For
more information, see the individual verb descriptions in Chapter 3,
APPC Control Verbs and Chapter 4, APPC
Conversation Verbs, or see Appendix C, APPC State Changes.
1.5.3 State Checks
A state check (state error) occurs when a TP issues an APPC verb, and the conversation is not in the appropriate
state. For instance, a state check would occur if a TP issued the MC_SEND_DATA verb while the conversation was
in Receive state. When a state check occurs, APPC does not execute the verb; it returns state-check information
through primary and secondary return codes. For more information about the state check error codes that can be
returned for each verb, see the individual verb descriptions in Chapter 3, APPC Control Verbs and Chapter 4, APPC
Conversation Verbs.
1.6 Changing Conversation States (half-duplex)
In Table 1–4, Using APPC Verbs to Change Conversation States, the conversation states appear in the left and right
margins. This table shows how APPC verbs can change the state of the conversation from Send to Receive and
from Receive to Send.
Table 1–4 Using APPC Verbs to Change Conversation States
State Invoking TP Flow Invoked TP State
TP_STARTED
Reset
MC_ALLOCATE(sync_level =
AP_CONFIRM_SYNC_LEVEL)
Send
MC_SEND_DATA
MC_PREPARE_TO_RECEIVE
(ptr_type =
AP_SYNC_LEVEL)
30