TipcMsgGetDest get the destination property of a message
msg
message to get destination from
dest_return
storage for message destination
TRUE
if the destination was successfully retrieved from the message, FALSE
otherwise.
If TipcMsgGetDest fails, it returns FALSE
and sets the global SmartSockets error number to one of:
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.
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.
TipcMsgGetSender, TipcMsgSetDest
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 |