TutBufAppendBuf append the contents of one buffer into another
dest
T_BUF object to receive the data
src
T_BUF object to provide the data
size
number of bytes to copy
Pointer into the destination buffer where the data was copied if successful, NULL
otherwise.
None
TutBufAppend copies data from the source buffer starting at that buffer’s "read pointer" into the destination buffer, appending the data onto the end of the destination buffer. The destination buffer grows, if necessary, to accommodate the data. If the given size is -1
, then all of the data in the source buffer from the current location to the end of the buffer is copied. If the given size is past the end of the source buffer, this function fails.
The returned pointer is only valid until the next call to a buffer operation that may resize the buffer, because the buffer may be moved during a resize.
TutBufCreate, TutBufDestroy, TutBufAppendRange
This example copies eight bytes from the buffer src
to the buffer dest
:
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |