Open topic with navigation

TIBCO Rendezvous® 8.7.0

# tibrvMsgData_SetSize()

Function

## Declaration

    tibrv_status tibrvMsgData_SetSize(
        char**       buffer,
        tibrv_u32    size);

## Purpose

Write the size of data into a wire buffer for an encoder.

## Remarks

This layer 1 function helps encoders write size information to a message’s wire buffer. It does only part of the work that tibrvMsgData_CopyBytes() does (see tibrvMsgData_SetSize):

Procedure

| 1. | Write the size information into the wire buffer, starting at the position `*buffer`.

| 2. | Advance `*buffer` to point to the end of the size information, which will become the start of the actual data.

| 3. | Return.

After tibrvMsgData_SetSize() returns, the encoder can continue by writing the data starting at the (advanced) position `*buffer`. We recommend using the more complete function tibrvMsgData_CopyBytes() to write the size and data with one call; when finer control is required, programmers can use this function instead, with corresponding responsibility.

When using this function, the encoder must first use tibrvMsgData_ByteSize() to measure the wire size from the data length.

Parameter | Description
`buffer` | The encoder supplies the address of a location within the message’s wire buffer. This function writes the `size` into the destination message, and advances this buffer pointer.
`size` | Size to copy into the wire buffer.

Figure 202: tibrvMsgData_SetSize

## See Also

tibrvMsgData_ByteSize()

tibrvMsgData_CopyBytes()

tibrvMsgData_Encoder

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2023. Cloud Software Group, Inc. All Rights Reserved.