TipcMsgGetDest


Name

TipcMsgGetDest — get the destination property of a message

Synopsis

T_BOOL TipcMsgGetDest(msg, dest_return) 
T_IPC_MSG msg; 
T_STR *dest_return; 

Arguments

msg — message to get destination from

dest_return — storage for message destination

Return Values

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

Diagnostics

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

Description

TipcMsgGetDest gets the destination property of a message. The destination property is a string whose meaning depends on how the message is being used. Messages sent with publish-subscribe between RTclients by RTserver, for example, use a subject name for the message sender and destination properties. Other applications of messages are free to use the sender and destination for other purposes. Message sender and destination properties can be null if they are not needed.

Caution

If TipcMsgGetDest returns FALSE, it does not store a value in dest_return.

Do not modify the value stored in dest_return. It points directly into an internal data structure.

See Also

TipcMsgGetSender, TipcMsgSetDest

Examples

This example prints the destination of a message:

T_STR dest; 
 
if (!TipcMsgGetDest(msg, &dest)) { 
  return;  /* error */ 
}  
 
/* sender and destination can be NULL, so we have to be careful */ 
TutOut("msg has destination %s\n", dest ? dest : "<NULL>"); 

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