db2commexitSend API - Send
This function is called for each buffer that the database manager sends to a client. It is applicable only in communication buffer exit libraries.
This function is called by the database manager immediately before a communication buffer is sent to the client. The function is called before the buffer is encrypted so that the communication buffer exit library can access the unencrypted buffer.
API header file
db2commexit.h
API and data structure syntax
SQL_API_RC ( SQL_API_FN * db2commexitSend )
(
void * pConnectionContext,
const db2commexitCommInfo_v1 * pCommInfo,
const db2commexitBuffer * pBuffer,
db2int64 * pReservedFlags,
char ** errormsg,
db2int32 * errormsglen
);
db2commexitSend API Parameters
- pConnectionContext
- Input. A pointer to communication buffer exit library-specific data. This pointer is specific to the inbound connection. This parameter is passed as input to each function call for that connection. The database manager cannot access the memory pointed to by this parameter.
- pCommInfo
- Input. A pointer to a structure that contains information which identifies the database server and protocol-specific information for the incoming connection. Some of the fields in the structure are not setup until multiple buffers are exchanged with the client. The fields are available in later calls to db2commexitRecv and db2commexitSend. This scenario applies specifically to inbound_appl_id, outbound_appl_id, and connection_type.
- pBuffer
- Input. A pointer to a structure that contains the length of the buffer that is sent to the client and a pointer to the buffer. If the buffer is encrypted, it is unencrypted before this function is called.
- pReservedFlags
- Input/Output. The bit DB2COMMEXIT_SEND_IN_FLAG_PURGE is set if the database manager encounters an error and must purge some buffers that were prepared to send to the client. Some of these buffers might be input to the communication buffer exit library.
- errormsg
- Output. A pointer to the address of an ASCII error message string that is allocated by the communication buffer exit library. This error messages string might be returned in this parameter if the function execution is not successful. This memory is not freed by calling db2commexitFreeErrormsg.
- errormsglen
- Output. A pointer to an integer that indicates the length, in bytes, of the error message string in the errormsg parameter.