HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)
Concepts
Nonblocking Operation
Chapter 158
The following steps explain the processing shown in the previous
example.
1. After allocating the conversation and sending some data, the
invoking program issues Set_Processing_Mode to set the processing
mode to CM_NON_BLOCKING. This indicates that subsequent functions
on this conversation can operate in nonblocking mode.
2. The invoking program then issues Confirm, which returns
CM_OPERATION_INCOMPLETE. This indicates that the function was
issued successfully and is operating in nonblocking mode.
3. The program can now perform other processing not related to this
conversation, including issuing CPI-C functions on other
conversations. It can also issue a limited range of CPI-C functions on
this conversation (such as the Extract_* functions). This is different
from the IBM CPI-C 2.0 specification, in which the program cannot
issue any functions on this conversation other than
Wait_For_Conversation or Cancel_Conversation.
4. At some later time, the program issues Wait_For_Conversation to
wait for the previous nonblocking function to complete. Since the
partner program has not yet issued Confirmed, processing for the
previous Confirm function has not completed, so the invoking
program is suspended.
5. When the partner program issues Confirmed, this completes the
processing of the invoking program's Confirm function. The
Wait_For_Conversation function then returns. The
return_code
of
Check for Completion
(
return_code
=CM_OK)
Wait_For_Conversation
(
return_code
=CM_OK,
conversation_return_code=CM_OK)
[Conversation is now deallocated.]
Table 1-5 Nonblocking Operation (Continued)
Invoking Program Invoked Program