HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)

Concepts
Conversation States
Chapter 144
For Unix Initialize-Incoming The program has successfully issued
Initialize_For_Incoming and obtained a conversation
ID. It can now issue Accept_Incoming to accept an
incoming conversation.
For Windows Pending-Post The program has successfully issued the Receive call in
nonblocking mode. While the call is outstanding, it can
issue a limited range of CPI-C calls on this
conversation, issue CPI-C calls on other conversations,
or continue with other processing.
End of Section The description of each CPI-C call includes information about the
conversation states in which it can be issued. For a table of which verbs
can be issued in each conversation state, see Appendix B, “Conversation
State Changes.
The Program's View of the Conversation
It is the conversation rather than the program that is in a particular
state. A program can be conducting several conversations, each of which
is in a different state. If a conversation is said to be in Send state, this is
from the viewpoint of the local program. To the partner program, the
conversation is in another state (such as Receive).
State Changes
A change in the conversation state can result from any of the following:
A call issued by the local program
A call issued by the partner program
An error condition
State Checks
A state check occurs when a program issues a CPI-C call, and the
conversation is not in the appropriate state. For instance, a state check
would occur if a program issued the Send_Data call while the
conversation was in Receive state. When a state check occurs, CPI-C does
not execute the call; it returns state-check information through the
return_code
parameter.