14#include "ws_symbol_export.h"
20#define SOME_FUNCTIONS_ARE_INLINE
22#define DEFAULT_INIT_BUFFER_SIZE_2048 (2 * 1024)
103#ifdef SOME_FUNCTIONS_ARE_INLINE
115 buffer->first_free += bytes;
124static inline uint8_t *
130static inline uint8_t *
164void ws_buffer_increase_length(
Buffer*
buffer,
size_t bytes);
WS_DLL_PUBLIC void ws_buffer_free(Buffer *buffer)
Frees the memory associated with a Buffer.
Definition buffer.c:46
WS_DLL_PUBLIC void ws_buffer_append(Buffer *buffer, const uint8_t *from, size_t bytes)
Appends data to the end of the buffer.
Definition buffer.c:102
WS_DLL_PUBLIC void ws_buffer_assure_space(Buffer *buffer, size_t space)
Ensures the buffer has enough space for additional data.
Definition buffer.c:64
WS_DLL_PUBLIC void ws_buffer_remove_start(Buffer *buffer, size_t bytes)
Removes bytes from the beginning of the buffer.
Definition buffer.c:111
WS_DLL_PUBLIC void ws_buffer_init(Buffer *buffer, size_t space)
Initializes a Buffer with the specified initial capacity.
Definition buffer.c:23
WS_DLL_PUBLIC void ws_buffer_cleanup(void)
Cleans up internal buffer state across all active buffers.
Definition buffer.c:177
A dynamic byte buffer with adjustable start and end positions.
Definition buffer.h:30
uint8_t * data
Definition buffer.h:31
size_t allocated
Definition buffer.h:32
size_t first_free
Definition buffer.h:34
size_t start
Definition buffer.h:33
Definition mcast_stream.h:30