TipcMsgGetRefCount


Name

TipcMsgGetRefCount — get the reference count of a message

Synopsis

T_BOOL TipcMsgGetRefCount(msg, ref_count_return) 
T_IPC_MSG msg; 
T_INT2 *ref_count_return; 

Arguments

msg — message to get reference count from

ref_count_return — storage for message reference count

Return Values

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

Diagnostics

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

Description

TipcMsgGetRefCount gets the reference count of a message. The reference count property can be used to prevent a message from being destroyed. See TipcMsgIncrRefCount for more information on message reference counts.

Caution

If TipcMsgGetRefCount returns FALSE, it does not store a value in ref_count_return.

See Also

TipcMsgDestroy, TipcMsgIncrRefCount

Examples

This example prints the reference count of a message:

T_IPC_MSG msg; 
T_INT2 ref_count; 
 
if (!TipcMsgGetRefCount(msg, &ref_count)) { 
  return;  /* error */ 
}  
 
TutOut("msg has ref count %d\n", ref_count); 

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