netstring.h (462B)
1 #ifndef MINIROON_NETSTRING_H 2 #define MINIROON_NETSTRING_H 3 4 // implementation: 5 // {IMP} netstring.c 6 7 #include <stdbool.h> 8 9 #include "bytebuffer.h" 10 11 typedef struct netstring_chunk_b { 12 bytebuffer source; 13 bytebuffer outer; 14 bytebuffer inner; 15 } netstring_chunk; 16 17 void netstring_chunk_init (netstring_chunk *chunk, const bytebuffer source); 18 bool netstring_chunk_next (netstring_chunk *c); 19 20 size_t netstring_write (bytebuffer *dest, const bytebuffer src); 21 22 #endif