TipcConnGetAutoFlushSize


Name

TipcConnGetAutoFlushSize — get the auto flush size of a connection

Synopsis

T_BOOL TipcConnGetAutoFlushSize(conn, auto_flush_size_return) 
T_IPC_CONN conn; 
T_INT4 *auto_flush_size_return; 

Arguments

conn — connection to get auto flush size from

auto_flush_size_return — storage for auto flush size

Return Values

TRUE if the auto flush size was successfully retrieved from connection, FALSE otherwise.

Diagnostics

If TipcConnGetAutoFlushSize fails, it returns FALSE and sets the global SmartSockets error number to:

Description

TipcConnGetAutoFlushSize gets the auto flush size of a connection. The auto flush size is used to control how much outgoing data (in bytes) is buffered before being automatically flushed to the other end of the connection. TipcConnMsgSend uses the auto flush size to determine when to flush the buffered outgoing messages. If the number of bytes of pending outgoing data exceeds the auto flush size, TipcConnMsgSend calls TipcConnFlush. The default for the auto flush size is 8192 bytes. Using auto flush size 0 disables all buffering and forces each outgoing message to be flushed immediately. Using auto flush size T_IPC_NO_AUTO_FLUSH_SIZE disables all automatic flushing of outgoing messages.

Caution

If TipcConnGetAutoFlushSize returns FALSE, it does not store a value in auto_flush_size_return.

See Also

TipcConnSetAutoFlushSize

Examples

This example gets the auto flush size of a connection with TipcConnGetAutoFlushSize and prints it:

T_INT4 auto_flush_size; 
 
if (!TipcConnGetAutoFlushSize(conn, &auto_flush_size)) { 
  return;  /* error */ 
}  
 
TutOut("The auto buffer size of the connection is %d bytes.\n",  
       auto_flush_size); 

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