TipcDeliveryModeToStr


Name

TipcDeliveryModeToStr — convert a message delivery mode to a string

Synopsis

T_BOOL TipcDeliveryModeToStr(delivery_mode, delivery_mode_str_return) 
T_IPC_DELIVERY_MODE delivery_mode; 
T_STR *delivery_mode_str_return; 

Arguments

delivery_mode — delivery mode to convert

delivery_mode_str_return — storage for string

Return Values

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

Diagnostics

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

Description

TipcDeliveryModeToStr converts a message delivery mode (such as T_IPC_DELIVERY_ALL) to a lower-case string (such as all).

Caution

If TipcDeliveryModeToStr returns FALSE, it does not store a value in delivery_mode_str_return.

The value stored in delivery_mode_str_return points directly into an internal data structure and should not be modified.

See Also

TipcStrToDeliveryMode

Examples

This example prints the delivery mode of a message:

T_IPC_DELIVERY_MODE delivery_mode; 
T_STR delivery_mode_str; 
 
if (!TipcMsgGetDeliveryMode(msg, &delivery_mode)) { 
  return;  /* error */ 
} 
 
if (!TipcDeliveryModeToStr(delivery_mode, &delivery_mode_str)) { 
  return;  /* error */ 
}  
 
TutOut("Message has delivery mode %s (%d).\n", 
       delivery_mode_str, delivery_mode); 

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