HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)
Concepts
Nonblocking Operation
Chapter 1 59
CM_OK indicates that Wait_For_Conversation completed successfully;
the conversation
return_code
of CM_OK indicates that the Confirm
function (for which it was waiting) completed successfully.
6. After sending additional data, the invoking program then issues
Deallocate, which returns CM_OPERATION_INCOMPLETE. This
indicates that the function was issued successfully and is operating
in nonblocking mode. As before, the program can now perform other
processing not related to this conversation, but cannot issue most
CPI-C functions on this conversation.
7. The partner program receives the Deallocate request and replies
with Confirmed. This completes the processing for the Deallocate
function.
8. The invoking program issues Check_For_Completion, to determine
whether any previous nonblocking functions on any of its
conversations have completed. Since the Deallocate processing has
already completed, Check_For_Completion returns with the
conversation_ID
of this conversation.
9. The program then issues Wait_For_Conversation, to get the result of
the Deallocate processing. This returns immediately because the
Deallocate processing has already completed.
For Windows The application should use the Specify_Windows_Handle function before
issuing any verbs in nonblocking mode. This function specifies a
Windows handle to which CPI-C sends a message when the verb
processing has completed. This message notifies the application that the
verb has completed; there is no need for the application to issue an
additional call to wait for the results of the verb processing.
CPI-C can use an alternate method to indicate the verb has
completed—signaling an event handle. If the application registers an
event with the conversation using WinCPICSetEvent(), then the
application can call the Win32 functions WaitForSingleObject() or
WaitForMultipleObjects() to wait to be notified of the completion of
the verb.
If the outstanding call is a Receive call, the application can issue the
following calls while Receive is outstanding:
• Request_To_Send
• Send_Error
• Test_Request_to_Send_Received