Soletta™ Framework
|
A sol_buffer is a dynamic array, that can be resized if needed. More...
#include <sol-buffer.h>
Data Fields | |
size_t | capacity |
Buffer capacity in bytes. More... | |
void * | data |
Buffer data. More... | |
enum sol_buffer_flags | flags |
Buffer flags. More... | |
size_t | used |
Used size in bytes. More... | |
A sol_buffer is a dynamic array, that can be resized if needed.
It grows exponentially but also supports setting a specific size.
Useful to reduce the noise of handling realloc/size-variable manually.
See also sol_arena if you are allocating multiple pieces of data that will be deallocated twice.
size_t sol_buffer::capacity |
Buffer capacity in bytes.
Referenced by _can_read(), sol_buffer_init(), sol_buffer_init_flags(), and sol_buffer_trim().
void* sol_buffer::data |
Buffer data.
Referenced by on_data_func(), on_digest_ready(), on_message(), print_attr(), response_cb(), shutdown(), sol_buffer_at(), sol_buffer_at_end(), sol_buffer_init(), and sol_buffer_init_flags().
enum sol_buffer_flags sol_buffer::flags |
Buffer flags.
Referenced by _can_read(), sol_buffer_init(), sol_buffer_init_flags(), and sol_buffer_trim().
size_t sol_buffer::used |
Used size in bytes.
Referenced by _can_read(), _inform_user(), api_close(), dump_byte_string(), hrs_measurement_read(), notify_callback(), on_data_func(), on_message(), on_stdin(), print_attr(), reply_cb(), response_cb(), sol_buffer_at(), sol_buffer_at_end(), sol_buffer_init(), sol_buffer_init_flags(), sol_buffer_reset(), sol_buffer_trim(), write_access_control_tlv(), write_security_tlv(), and write_server_tlv().