TipcBufMsgAppend
append a message to a T_BUF object
buf
buffer to hold the message
msg
msg to append
TRUE
if the append was successful, FALSE
if not.
If TipcMsgMsgAppend fails, it returns FALSE
. It does not set the global error number.
Appends a normal SmartSockets message to a T_BUF object created by TutBufCreate.
This function is only needed under unusual circumstances, such as for storing a complete SmartSockets message, rather than the contents of the message, in a database.
TipcBufMsgNext; see the TIBCO SmartSockets Utilities for information on TutBufCreate and TutBufDestroy.
This example creates a T_BUF object and a message, then stores the message in the buffer:
T_IPC_MSG msg; T_IPC_MT mt; T_BUF buf; buf = TutBufCreate(128); if (buf == NULL) {
return
; /* error */
} mt = TipcMtLookupByNum(T_MT_INFO); if (mt == NULL) {
return
; /* error */
} msg = TipcMsgCreate(mt); if (msg == NULL) {
return
; /* error */
} TipcMsgAppendStr(msg, "hiya!"); TipcBufMsgAppend(buf, msg);
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |