TipcConnGetTimeout


Name

TipcConnGetTimeout — get a timeout property of a connection

Synopsis

T_BOOL TipcConnGetTimeout(conn, timeout, value_return) 
T_IPC_CONN conn; 
T_IPC_TIMEOUT timeout; 
T_REAL8 *value_return; 

Arguments

conn — connection for which get timeout

timeout — which timeout property to get

value_return — storage for timeout value

Return Values

TRUE if the timeout property was successfully retrieved from connection, FALSE otherwise.

Diagnostics

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

Description

TipcConnGetTimeout gets a timeout property of a connection. The timeout properties control how often (in seconds) the connection is checked for possible network failures. The default for all timeout properties is 0.0, which means that timeouts are not checked.

If timeout is T_IPC_TIMEOUT_READ, TipcConnGetTimeout gets the read timeout of a connection. TipcConnCheck uses the read timeout to control how often data is expected to be available for reading on the connection. A read timeout property of 0.0 disables checking for read timeouts. See TipcConnCheck for more information on how read timeouts are used.

If timeout is T_IPC_TIMEOUT_WRITE, TipcConnGetTimeout gets the write timeout of a connection. TipcConnCheck uses the write timeout to control how often data is expected to be available to be written on the connection. A write timeout property of 0.0 disables checking for write timeouts. See TipcConnCheck for more information on how write timeouts are used.

If timeout is T_IPC_TIMEOUT_KEEP_ALIVE, TipcConnGetTimeout gets the keep alive timeout of a connection. TipcConnKeepAlive uses the keep alive timeout to control how long to wait when checking if the other end of a connection is still alive. See TipcConnKeepAlive for more information on keep alives. A keep alive timeout property of 0.0 disables keep alives.

If timeout is T_IPC_TIMEOUT_DELIVERY, TipcConnGetTimeout gets the delivery timeout of a connection. TipcConnCheck and TipcConnRead use the delivery timeout to control how long to wait for guaranteed delivery of a message on the connection. A delivery timeout property of 0.0 disables checking for delivery timeouts. See TipcConnCheck and TipcConnRead for more information on how delivery timeouts are used.

Caution

If TipcConnGetTimeout returns FALSE, it does not store a value in value_return.

See Also

TipcConnCheck, TipcConnFlush, TipcConnRead, TipcConnSetTimeout

Examples

This example gets the read timeout of a connection with TipcConnGetTimeout and prints it:

T_REAL8 timeout; 
 
if (!TipcConnGetTimeout(conn, T_IPC_TIMEOUT_READ, &timeout)) { 
  return;  /* error */ 
}  
 
TutOut("The connection read timeout is %s seconds.\n", 
       TutRealToStr(timeout)); 

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