Sends control messages to Client-Library.
CS_RETCODE srv_send_ctlinfo(SRV_PROC *srvproc, CS_INT ctl_type,
SRV_CTL_MIGRATE ctl_type, CS_INT paramcnt, SRV_CTLITEM *param)
A pointer to an internal thread control structure.
The type of control message to send.
The number of elements in the param array.
Parameters for library control message.
ctl_type has the following values:
SRV_CTL_MIGRATE
Sends migration request to the client or cancel a previous migration request. SRV_CTL_MIGRATE can be used only if the client supports migration and has received a session ID when it first connected to the session.
See “SRV_CTL_MIGRATE”.
SRV_CTL_LOGINREDIRECT
Only valid during a connect handler. When used, a SRV_PROC for which SRV_T_REDIRECT is true will instruct the client to restart login using the passed-in server addresses.
SRV_CTL_HAUPDATE
Valid at any time srv_sendinfo is valid. When the server sends this message to a client, the client will replace its current HA failover target information with the server connection information as expressed via param.
param has the following fields:
SRV_CTLTYPES srv_ctlitemtype, where srv_ctlitemtype indicates the parameter type. The following types are available:
SRV_CT_SERVERNAME, which indicates that srv_ctlptr points to a CS_CHAR string containing the name of the server whose address will be looked up.
SRV_CT_TRANADDR, which indicates that srv_ctlptr points to a CS_TRANADDR structure containing the server address information.
SRV_CT_ADDRSTR, which indicates that srv_ctlptr points to a string formated by srv_getserverbyname.
SRV_CT_OPTION, which indicates that srv_ctlptr points to a CS_INT bitmask that contains a set of options for this message.
CS_INT srv_ctllength, which is the length of variable size parameters. When srv_ctlitemtype is SRV_CT_SERVERNAME or SRV_CT_ADDRSTR, it is the length of the string pointed to by srv_ctlptr or CS_NULLTERM. When srv_ctlitemtype is SRV_CT_TRANADDR, it is the number of elements in the CS_TRANADDR array pointed to by srv_ctlptr.
void *srv_ctlptr, where srv_ctlptr points to the actual parameter data.