TipcMsgGetPriority


Name

TipcMsgGetPriority — get the priority of a message

Synopsis

T_BOOL TipcMsgGetPriority(msg, priority_return) 
T_IPC_MSG msg; 
T_INT2 *priority_return; 

Arguments

msg — message to get priority from

priority_return — storage for message priority

Return Values

TRUE if the priority was successfully retrieved from the message, FALSE otherwise.

Diagnostics

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

Description

TipcMsgGetPriority gets the priority of a message. Message priorities are used by TipcConnRead to queue incoming messages in priority order. When a message is created, its priority is initialized to the message type priority (if set) or to the value of the option Default_Msg_Priority (if the message type priority is unknown). This allows a default value to be set easily for all messages of a certain type or for all messages.

Caution

If TipcMsgGetPriority returns FALSE, it does not store a value in priority_return.

See Also

TipcConnRead, TipcMsgSetPriority, TipcMtGetPriority

Examples

This example prints the priority of a message:

T_INT2 priority; 
 
if (!TipcMsgGetPriority(msg, &priority)) { 
  return;  /* error */ 
}  
 
TutOut("msg has priority %d\n", priority); 

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