TipcSrvCheck


Name

TipcSrvCheck — check if data can be read from or written to connection to RTserver

Synopsis

T_BOOL TipcSrvCheck(check_mode, timeout) 
T_IO_CHECK_MODE check_mode; 
T_REAL8 timeout; 

Arguments

check_mode — how to check RTserver availability

timeout — maximum number of seconds to wait for availability

Return Values

TRUE if data can be read or written, FALSE if timeout reached or an error occurred.

Diagnostics

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

Description

TipcSrvCheck checks the connection to RTserver by calling TipcConnCheck. The connection can be checked if data can be read (check_mode is T_IO_CHECK_READ) or if data can be written (check_mode is T_IO_CHECK_WRITE). See TipcConnCheck for more information on checking connections.

TipcSrvCheck may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvCheck sleeps for timeout seconds and returns FALSE. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver.

Caution

TipcSrvCheck is a low-level function that is normally not used directly by developers. TipcConnCheck is normally called only by TipcSrvFlush and TipcSrvRead.

See Also

TipcConnCheck, TipcSrvRead

Examples

This example uses TipcSrvCheck to check if data is available within 3.4 seconds for reading from the connection to RTserver:

if (!TipcSrvCheck(T_IO_CHECK_READ, 3.4)) { 
  return;  /* error */ 
}  

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