HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)
Concepts
Conversation States
Chapter 1 43
Conversation States
The state of the conversation governs which CPI-C calls can be issued by
the program. For instance, a program cannot issue the Send_Data call if
the conversation is not in Send or Send-Pending state. Possible
conversation states are summarized in the list below.
Reset The conversation has not started or has been
terminated.
Initialize The conversation has been initialized successfully.
Send The program can send data to the partner program and
request confirmation.When the conversation is in Send
state, the program can also beginto receive data, which
can cause the state to change to Receive.
Send-Pending The program issued a Receive call and received data as
well as a send indicator (
status_received
=
CM_SEND_RECEIVED), indicating that the program can
begin to send data. This state is similar to Send state,
except that the program can provide additional
information when reporting errors (to indicate whether
it detected an error in the received data or in its own
processing).
Receive The program can receive application data and status
information from the partner program. When the
conversation is in Receive state, the program can also
send error information and request permission to send
data.
Confirm The program has received a request for confirmation of
receipt of data; it must respond positively or send error
information to the partner program.
Confirm-Deallocate The program has received a request for confirmation
and must respond positively or send error information.
If the program responds positively, the partner
program deallocates the conversation.
Confirm-Send The program has received a request for confirmation; it
must respond positively or send error information.
After responding, the program can begin to send data.