HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)
CPI-C Calls
Set_Processing_Mode (cmspm)
Chapter 3 277
Set_Processing_Mode (cmspm)
This function is not available in Java CPI-C. Java CPI-C functions
always operate in blocking mode; that is, the function does not return
control to the application until the requested processing has completed.
The Set_Processing_Mode call specifies whether subsequent CPI-C calls
will return when the required operation is complete (blocking mode), or
return immediately even if the operation is not complete (nonblocking
mode). The default processing mode, established by the
Initialize_Conversation or Accept_Conversation call, is CM_BLOCKING
(blocking mode).
For Unix If the conversation's processing mode is nonblocking, CPI-C calls issued
on this conversation can return immediately with a return code of
CM_OPERATION_INCOMPLETE to indicate that the requested operation has
not been completed. The application can then perform other processing
not related to this conversation, or can issue any of the following calls:
• Check_For_Completion, to determine whether any outstanding call
(on this or any other conversation) has completed
• Wait_For_Conversation, to wait for this call to complete
• Cancel_Conversation, to cancel the outstanding call and deallocate
the conversation
For Windows A Windows application can use the Wait_For_Conversation call, as
described previously. However, the recommended method for handling
nonblocking calls is to use Specify_Windows_Handle. This function,
which must be issued before any nonblocking calls, specifies a Windows
handle to which CPI-C sends a message when the call processing has
completed. The application checks the results of the call when it receives
this message, and does not use Wait_For_Conversation.
Check_For_Completion, described previously for HP-UX systems, is not
supported on Windows systems.
If the outstanding call is a Receive call, a Windows application can issue
the Request_To_Send, Send_Error, Test_Request_to_Send_Received, or
Deallocate calls in addition to those listed previously. For more
information, see “Receive (cmrcv)”.