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

CPI-C Calls
Accept_Conversation (cmaccp)
Chapter 3 121
Usage Notes
The TP name can be specified in a number of ways. For more information
about specifying local TP names, see “Specifying the Local TP Name” in
Chapter 2. Before issuing Accept_Conversation, the program can issue
Specify_Local_TP_Name to indicate one or more TP names for which it
will accept incoming Allocates (these names are in addition to names
defined in other ways such as the APPCTPN environment variable). If it
specifies more than one TP name in this way, then it can use the
Extract_TP_Name call (after Accept_Conversation returns) to determine
which TP name the invoking program used.
For Unix When Accept_Conversation returns CM_OK, a new conversation context is
created for the conversation, and this becomes the program's current
context.
Accept_Conversation always operates in blocking mode; that is, it always
suspends until an incoming Allocate request is received. The following
methods can be used to avoid unnecessary delays:
Ensure that the invokable TP configuration for this application
specifies a small timeout value, so that the Accept_Conversation call
will return quickly (with
return_code
CM_PROGRAM_STATE_CHECK)if
there is no incoming Allocate request, and then make the application
retry Accept_Conversation later. The timeout value is specified in the
SNAplus2 invokable TP data file; refer to the SNAplus2
Administration Guide for more information.
Instead of using Accept_Conversation, use Accept_Incoming, which
can operate in nonblocking mode. Use 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
See the descriptions of these calls for more information.
End of Section