gbuffer_append_gbuf()

gbuffer_append_gbuf()#

Appends the contents of one gbuffer_t to another. The data from src is copied into dst, preserving the read position of src.

Prototype

int gbuffer_append_gbuf(
    gbuffer_t *dst,
    gbuffer_t *src
);

Parameters

Key

Type

Description

dst

gbuffer_t *

The destination buffer where data will be appended.

src

gbuffer_t *

The source buffer whose data will be copied into dst.


Return Value

Returns 0 on success, or -1 if an error occurs during the append operation.

Notes

The function iterates over src in chunks, copying data into dst. Ensure that dst has enough space to accommodate the data from src.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples