TipcMsgAppendStr append a STR field to a message
msg
message to append field to
str_data
data for new message field
TRUE
if the field was successfully appended to the message, FALSE
otherwise.
If TipcMsgAppendStr fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcMsgAppendStr appends a null-terminated character string field containing str_data
to the end of a message’s data. A string field is a special case of an array of characters. TipcMsgAppendStr makes a copy of the string data.
None
TipcMsgAppendStrPtr, TipcMsgNextStr
This example creates a message and appends a STR field:
T_IPC_MT mt; T_IPC_MSG msg; #define USER_MT_STR_TEST 100 mt = TipcMtCreate("str_test", USER_MT_STR_TEST, "str"); if (mt == NULL) {return
; /* error */
} msg = TipcMsgCreate(mt); if (mt == NULL) {return
; /* error */
}/* An RTclient would typically set the destination of */
/* a message at this point by calling TipcMsgSetDest. */
if (!TipcMsgAppendStr(msg, "This is the field data.")) {return
; /* error */
}/* A process would typically send a message at this point by */
/* calling TipcConnMsgSend or TipcSrvMsgSend. */
/* A process would typically destroy a message at this point by */
/* calling TipcMsgDestroy. */
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |