TipcMsgSetPriority


Name

TipcMsgSetPriority — set the priority of a message

Synopsis

T_BOOL TipcMsgSetPriority(msg, priority) 
T_IPC_MSG msg; 
T_INT2 priority; 

Arguments

msg — message to set priority for

priority — message priority

Return Values

TRUE if the priority was successfully set for the message, FALSE otherwise.

Diagnostics

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

Description

TipcMsgSetPriority sets the priority of a message. Message priorities are used by TipcConnRead to queue incoming messages in priority order. TipcMsgSetPriority overwrites the default value of the priority property set by TipcMtSetPriority. See TipcMsgGetPriority for more information on message priorities.

Caution

Setting message priorities on GMD or load-balanced (LB) messages is not recommended. GMD and LB rely on high sequence numbers for correct functioning, and unexpected behavior may occur if such messages are received out of order due to the use of message priorities.

See Also

TipcMsgGetPriority, TipcMtSetPriority

Examples

This example sets the priority of a message to 2:

if (!TipcMsgSetPriority(msg, 2)) { 
  return;  /* error */ 
}  

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