TipcSrvSetBlockMode


Name

TipcSrvSetBlockMode — set the block mode of the connection to RTserver

Synopsis

T_BOOL TipcSrvSetBlockMode(block_mode) 
T_BOOL block_mode; 

Arguments

block_mode — block mode

Return Values

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

Diagnostics

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

Description

TipcSrvSetBlockMode sets the block mode of the connection to RTserver by calling TipcConnSetBlockMode. The block mode controls whether or not the RTclient blocks waiting for read and write operations to complete. SeeTipcConnGetBlockMode for more information on connection block modes.

TipcSrvSetBlockMode may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvSetBlockMode returns FALSE immediately. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver.

Caution

Use TipcSrvSetBlockMode with caution. The block mode of the connection to RTserver is automatically set to FALSE if both of the options Server_Read_Timeout and Server_Write_Timeout are non-zero. This is needed because the timeouts cannot take effect if the block mode is TRUE. In a similar fashion, the block mode of the connection to RTserver is automatically set to TRUE if either of the options Server_Read_Timeout or Server_Write_Timeout are zero.

See Also

TipcConnSetBlockMode, TipcSrvGetBlockMode

Examples

This example sets the block mode of the connection to RTserver to FALSE so that the RTclient does not block waiting for read and write operations to complete:

if (!TipcSrvSetBlockMode(FALSE)) { 
  return;  /* error */ 
} 

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