TipcSrvGetConnStatus get the status of the connection to RTserver
conn_status_return
storage for connection status
TRUE
if connection status was successfully retrieved, FALSE
otherwise.
If TipcSrvGetConnStatus fails, it returns FALSE
and sets the global SmartSockets error number to:
TipcSrvGetConnStatus gets the status of the connection to RTserver. A connection status of T_IPC_SRV_CONN_FULL
indicates that the RTclient does have a connection to RTserver. A connection status of T_IPC_SRV_CONN_WARM
indicates that the RTclient has a warm connection to RTserver. A connection status of T_IPC_SRV_CONN_NONE
indicates that the RTclient does not have a connection to RTserver. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver. See TipcSrvDestroy for more information on destroying the connection to RTserver.
If TipcSrvGetConnStatus returns FALSE
, it does not store a value in conn_status_return
.
TipcSrvCreate, TipcSrvDestroy, TipcSrvIsRunning
This example uses TipcSrvGetConnStatus to ensure that the RTclient has some kind of connection to RTserver:
T_IPC_SRV_CONN_STATUS conn_status; if (!TipcSrvGetConnStatus(&conn_status)) {return
; /* error */
} if (conn_status == T_IPC_SRV_CONN_NONE) { TutOut("This process has no connection to RTserver.\n"); if (!TipcSrvCreate(T_IPC_SRV_CONN_FULL)) {
return
; /* error */
} }
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |