The SRV_T_SESSIONID is a thread property that retrieves the session ID that the client sends to Open Server. An Open Server application can also set the SRV_T_SESSIONID property using the srv_thread_props() function, given that:
The srv_thread_props(CS_SET, SRV_T_SESSIONID) call is made inside the SRV_CONNECT event handler and,
The client supports connection migration or high availability.
This sample code sets the SRV_T_SESSIONID property:
CS_RETCODE ret; CS_SESSIONID hasessionid; ret = srv_thread_props(sp, CS_SET, SRV_T_SESSIONID, hasessionid, sizeof(hasessionid), NULL);
In version 15.0 ESD#14 and earlier, for HA-failover, you must program an srv_negotiate() sequence
to send the session ID to the client.