HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)
CPI-C Calls
Wait_For_Conversation (cmwait)
Chapter 3 303
State Change
If
return_code
is set to CM_OK, the state change depends on the
outstanding call that completed, and on the return code from that call
(the
conversation_return_code
parameter on this call). For more
information, see the description of the specific call. If
return_code
is not
CM_OK, there is no state change.
Usage Notes
This call does not change the program's current context (even if the
outstanding operation that has completed is one that would normally do
this, such as Accept_Incoming). If necessary, the program can use
Extract_Conversation_Context for the
conversation_ID
returned on
this call, to get the value of the conversation context, and
Set_Conversation_Context to set its current context to this value.
If no previously outstanding call has completed, this call blocks (and the
application's processing is suspended) until one completes.
For Unix To check for completed calls without blocking, the application can use
Check_For_Completion (which always returns immediately) to
determine whethera call has completed, and call Wait_For_Conversation
only when Check_For_Completion indicates that a call has completed
(and therefore Wait_For_Conversation will return immediately).
If there are multiple outstanding calls (on different conversations), each
Wait_For_Conversation call returns one outstanding call. After issuing
Wait_For_Conversation, the application can check whether any other
calls have completed by issuing Check_For_Completion.
For Windows A Windows application can use Wait_For_Conversation, as described
previously. However, the recommended method of 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.
End of Section