TipcMsgGetSender get the sender property of a message
msg
message to get sender from
sender_return
storage for message sender
TRUE
if the sender was successfully retrieved from the message, FALSE
otherwise.
If TipcMsgGetSender fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcMsgGetSender gets the sender property of a message. The sender 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 TipcMsgGetSender returns FALSE
, it does not store a value in sender_return
.
Do not modify the value stored in sender_return
. It points directly into an internal data structure.
TipcMsgGetDest, TipcMsgSetType
This example prints the sender of a message:
T_STR sender; if (!TipcMsgGetSender(msg, &sender)) {return
; /* error */
}/* sender and destination can be NULL, so we have to be careful */
TutOut("msg has sender %s\n", sender ? sender : "<NULL>");
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |