gbuffer_get()#
gbuffer_get() extracts a specified number of bytes from the given gbuffer_t and returns a pointer to the extracted data.
Prototype
void *gbuffer_get(
gbuffer_t *gbuf,
size_t len
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
Pointer to the |
|
|
Number of bytes to extract from the buffer. |
Return Value
Returns a pointer to the extracted data if len bytes are available; otherwise, returns NULL.
Notes
Ensure that len does not exceed the available data in gbuffer_t. If len is greater than the remaining bytes, the function returns NULL without modifying the buffer.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples