// This file is part of noxos and licensed under the MIT open source license #ifndef NOX_STREAM_H #define NOX_STREAM_H #include "utils/stdtypes.h" typedef struct { uint8_t* buffer; uint32_t size; uint32_t pos_sender; uint32_t pos_receiver; } stream_T; stream_T* stream_alloc (uint32_t size); void stream_destruct (stream_T* stream); uint32_t stream_write (stream_T* stream, void* buffer_in, uint32_t n); uint32_t stream_read (stream_T* stream, void* buffer_out, uint32_t n); #endif //NOX_STREAM_H