TipcSrvConnKeepAlive


Name

TipcSrvConnKeepAlive — check the health of the connection to RTserver.

Synopsis

T_BOOL TipcSrvConnKeepAlive(srv) 
T_IPC_SRV srv; 

Arguments

srv — connection handle to RTserver

Return Values

TRUE if RTserver responded in time, FALSE otherwise.

Diagnostics

If TipcSrvConnKeepAlive fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TipcSrvConnKeepAlive checks if the connection to RTserver is still alive by calling TipcConnKeepAlive. This check is called a keep alive. See TipcConnKeepAlive for more information on keep alives.

TipcSrvConnKeepAlive may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvConnKeepAlive immediately returns FALSE. See TipcSrvConnOpen for more information on automatic creation of connections and warm connections to RTserver.

Caution

None

See Also

TipcConnKeepAlive

Examples

This example creates a connection to RTserver, then performs a keep alive every 10 seconds to check the health of the connection to RTserver:

if (!TipcSrvConnOpen(srv, T_IPC_SRV_CONN_FULL)) { 
  return;  /* error */ 
}  
 
for (;;) { 
  TutSleep(10.0); 
  if (!TipcSrvConnKeepAlive(srv)) { 
    return;  /* error */ 
  }  
} 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com