TipcSrvConnSetTimeout


Name

TipcSrvConnSetTimeout — set a timeout property of the connection

Synopsis

T_BOOL TipcSrvConnSetTimeout(srv, timeout, value) 
T_IPC_SRV srv; 
T_IPC_TIMEOUT timeout; 
T_REAL8 value; 

Arguments

srv — connection handle to RTserver

timeout — which timeout property to set

valuetimeout value (in seconds)

Return Values

TRUE if the timeout was successfully set for the connection to RTserver, FALSE otherwise.

Diagnostics

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

Description

TipcSrvConnSetTimeout sets a timeout property of the connection to RTserver by setting one of the options: Server_Read_Timeout, Server_Write_Timeout, Server_Keep_Alive_Timeout, or Server_Delivery_Timeout. The timeout properties control how often the connection to RTserver is checked for possible network failures. See TipcSrvConnGetTimeout for more information on connection timeouts.

TipcSrvConnSetTimeout may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvConnSetTimeout sets a timeout property of the warm connection. See TipcSrvConnOpen for more information on automatic creation of connections and warm connections to RTserver.

Caution

None

See Also

TipcConnSetTimeout, TipcSrvConnGetTimeout

Examples

This example sets the read timeout of the connection to RTserver with TipcSrvConnSetTimeout to 10 seconds:

if (!TipcSrvConnSetTimeout(srv, T_IPC_TIMEOUT_READ, 10.0)) { 
  return;  /* error */ 
}  

An alternate way to set the read timeout of the connection to RTserver is to set the option Server_Read_Timeout:

TutCommandParseStr("setopt server_read_timeout 10.0"); 

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