HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)

CPI-C Calls
Accept_Incoming (cmacci)
Chapter 3124
CM_OPERATION_INCOMPLETE
CM_OPERATION_NOT_ACCEPTED
CM_PRODUCT_SPECIFIC_ERROR
State When Issued
The conversation must be in Initialize-Incoming state.
State Change
If the call is successful, the conversation changes to Receive state. If the
call fails, the state remains unchanged.
Usage Notes
Issuing Initialize_For_Incoming followed by Accept_Incoming is
equivalent to issuing Accept_Conversation. The difference between the
two methods of accepting a conversation is that Accept_Conversation
always operates in blocking mode, whereas Accept_Incoming can operate
in nonblocking mode. To accept a conversation in nonblocking mode, the
program issues the following sequence of calls:
Initialize_For_Incoming (to obtain a conversation ID for the incoming
conversation)
Set_Processing_Mode (to set the
processing_mode
for this conversation ID
to CM_NON_BLOCKING)
Accept_Incoming
The TP name specified by the APPCTPN environment variable is normally
the name used to match incoming Allocates with this program. Before
issuing Accept_Incoming, the program can issue
Specify_Local_TP_Name to indicate one or more TP names for which it
will accept incoming Allocates (these names replace the name in
APPCTPN). If it specifies more than one TP name in this way, then it can
use the Extract_TP_Name call (after Accept_Incoming returns) to
determine which TP name the invoking program used. For more
information about specifying local TP names, see “Specifying the Local
TP Name” in Chapter 2.
When Accept_Incoming returns CM_OK, a new conversation context is
created for the conversation, and this becomes the program's current
context. When Accept_Incomingreturns CM_OPERATION_INCOMPLETE and
a subsequent Wait_For_Conversation returns the completion of
Accept_Incoming as CM_OK, a new conversation context is created for the