summaryrefslogtreecommitdiff
path: root/include/ser.h
diff options
context:
space:
mode:
authorLizzy Fleckenstein <lizzy@vlhl.dev>2024-06-19 15:29:19 +0200
committerLizzy Fleckenstein <lizzy@vlhl.dev>2024-06-19 15:29:19 +0200
commitead2881be92d33076c2104dbd75bad3561f26088 (patch)
tree75ed0217a40a1321ce22ca7b675f4d148ce29161 /include/ser.h
parentf19e329254d89ddf6d946410b56975a5c550c3f4 (diff)
downloadsilly_game-ead2881be92d33076c2104dbd75bad3561f26088.tar.xz
server: implement auth and sending nodes
Diffstat (limited to 'include/ser.h')
-rw-r--r--include/ser.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/ser.h b/include/ser.h
index c1f207d..374e5d9 100644
--- a/include/ser.h
+++ b/include/ser.h
@@ -12,8 +12,9 @@
// ser
-void ser_bytes(strbuf *w, size_t len, uint8_t *x);
+void ser_bytes(strbuf *w, void *x, size_t len);
+void ser_bool(strbuf *w, bool x);
void ser_str(strbuf *w, str x);
void ser_u8(strbuf *w, uint8_t x);
@@ -30,8 +31,9 @@ void ser_i64(strbuf *w, int64_t x);
// deser
-bool deser_bytes(str *r, size_t len, uint8_t *buf);
+bool deser_bytes(str *r, void *buf, size_t len);
+bool deser_bool(str *r, bool *buf);
bool deser_str(str *r, str *buf); // returns slice!
bool deser_u8(str *r, uint8_t *buf);