TipcMtSetLbMode


Name

TipcMtSetLbMode — set the load balancing mode of a message type

Synopsis

T_BOOL TipcMtSetLbMode(mt, lb_mode) 
T_IPC_MT mt; 
T_IPC_LB_MODE lb_mode; 

Arguments

mt — message type to set load balancing mode for

lb_mode — message type load balancing mode (T_IPC_LB_NONE, T_IPC_LB_ROUND_ROBIN, T_IPC_LB_WEIGHTED, or T_IPC_LB_SORTED)

Return Values

TRUE if the load balancing mode was successfully set for the message type, FALSE otherwise.

Diagnostics

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

Description

TipcMtSetLbMode sets the load balancing mode of a message type. The load balancing mode of a message type is used as the default load balancing mode for messages of this type. See TipcMtGetLbMode for more information on message type load balancing modes.

Caution

None

See Also

TipcMsgSetLbMode, TipcMtGetLbMode

Examples

This example sets the load balancing mode of the NUMERIC_DATA message type to T_IPC_LB_WEIGHTED:

T_IPC_MT mt; 
 
mt = TipcMtLookup("numeric_data"); 
if (mt == NULL) { 
  return;  /* error */ 
} 
if (!TipcMtSetLbMode(mt, T_IPC_LB_WEIGHTED)) { 
  return;  /* error */ 
} 
/* After this point, all newly-created NUMERIC_DATA messages will have a default load 
balancing mode of T_IPC_LB_WEIGHTED. */ 

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