gtpc2mbcC/C++ Language Support User's Guide

cmsst-Set the Send_Type Characteristic

This function sets the send_type characteristic. It overrides the default value set by the cminit or cmaccp function.

Format

#include   <tpfmap.h>
void       cmsst(unsigned char *conversation_ID,
                 signed int *send_type,
                 signed int *return_code);

conversation_ID
This is a pointer to an 8-byte character array that contains the conversation ID. This conversation ID must be the ID returned by the cminit (INITIALIZE) or cmaccp (ACCEPT_CONVERSATION) that started this conversation.

send_type
This is a pointer to a 4-byte field that, when a program issues a cmsend function, specifies the information that will be sent to the remote program in addition to the data supplied to the cmsend function. This parameter also specifies whether the data will be buffered or sent immediately. Use one of the following values:

CM_BUFFER_DATA
This value specifies that the supplied data cannot be sent until a sufficient quantity is accumulated.

CM_SEND_AND_FLUSH
This value specifies that no additional information is to be sent to the remote program. The function calls a cmsend followed by a cmflus.

CM_SEND_AND_CONFIRM
This value specifies that the data is to be sent immediately, followed by a confirmation request.

CM_SEND_AND_PREP_TO_RECEIVE
This value specifies that the data is to be sent immediately and the local transaction program is to be placed in receive state. After receiving all the data, the remote transaction program enters send-pending or confirm-send state.

CM_SEND_AND_DEALLOCATE
This value specifies that the data is to be sent immediately. Then the conversation is deallocated.

return_code
This is a pointer to a 4-byte field where the return code will be placed.

Return Codes

The following is a list of return codes that can be returned to the program that called the cmsst function. A complete list of the return codes and their definitions can be found in Table 45.

Programming Considerations

Examples

The following example changes the send_type characteristic.

#include <tpfmap.h>
 
      unsigned char convid[8];
      signed int    type;
      signed int    rcode;
      .
      .
/* set conversation_ID with value returned from accept or initialize */
      .
      .
cmsst(convid,&type,&rcode);
      .                       /*  normal processing path             */
      .
      .

Related Information