TipcMsgGetSender


Name

TipcMsgGetSender — get the sender property of a message

Synopsis

T_BOOL TipcMsgGetSender(msg, sender_return) 
T_IPC_MSG msg; 
T_STR *sender_return; 

Arguments

msg — message to get sender from

sender_return — storage for message sender

Return Values

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

Diagnostics

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

Description

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.

Caution

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.

See Also

TipcMsgGetDest, TipcMsgSetType

Examples

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