From 78f8f18e48d25547e837630d8317ef029bba6d72 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 13 Oct 2022 20:37:23 +0200 Subject: more protocol parsing done --- shared/bin.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 shared/bin.c (limited to 'shared/bin.c') diff --git a/shared/bin.c b/shared/bin.c new file mode 100644 index 0000000..def2aa8 --- /dev/null +++ b/shared/bin.c @@ -0,0 +1,11 @@ +#include +#include +#include + +#include "bin.h" + +ws_s_bin *ws_bin_s_alloc(uint16_t bytes) { + ws_s_bin *temp = malloc(sizeof(ws_s_bin) + sizeof(uint8_t) * bytes); + temp->bytes = bytes; + return temp; +} -- cgit v1.2.3