TipcLbModeToStr convert a message load balancing mode to a string
T_BOOL TipcLbModeToStr(lb_mode
,lb_mode_str_return
) T_IPC_LB_MODElb_mode
; T_STR *lb_mode_str_return
;
lb_mode
load balancing mode to convert
lb_mode_str_return
storage for string
TRUE
if the load balancing mode was successfully converted to a string, FALSE
otherwise.
If TipcLbModeToStr fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcLbModeToStr converts a message load balancing mode (such as T_IPC_LB_SORTED) to a lower-case string (such as sorted
).
If TipcLbModeToStr returns FALSE
, it does not store a value in lb_mode_str_return
. The value stored in lb_mode_str_return
points directly into an internal data structure and should not be modified.
This example prints the load balancing mode of a message:
T_IPC_LB_MODE lb_mode; T_STR lb_mode_str; if (!TipcMsgGetLbMode(msg, &lb_mode)) {return
; /* error */
} if (!TipcLbModeToStr(lb_mode, &lb_mode_str)) {return
; /* error */
} TutOut("Message has load balancing mode %s (%d).\n", lb_mode_str, lb_mode);
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |