TipcStrToLbMode


Name

TipcStrToLbMode — convert a string to a message load balancing mode

Synopsis

T_BOOL TipcStrToLbMode(lb_mode_str, lb_mode_return) 
T_STR lb_mode_str; 
T_IPC_LB_MODE *lb_mode_return; 

Arguments

lb_mode_str — load balancing mode string to convert

lb_mode_return — storage for the load balancing mode

Return Values

TRUE if the string was successfully converted to a load balancing mode, FALSE otherwise.

Diagnostics

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

Description

TipcStrToLbMode converts a string (such as weighted) to a message load balancing mode (such as T_IPC_LB_WEIGHTED). The string can be in any case. (For example, weighted, WEIGHTED, and Weighted are all converted to T_IPC_LB_WEIGHTED.)

Caution

If TipcStrToLbMode returns FALSE, it does not store a value in lb_mode_return.

See Also

TipcLbModeToStr

Examples

This example converts a string mode into a number load balancing mode:

if (!TipcStrToLbMode(str, &lb_mode)) { 
  return;  /* error */ 
} 

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