From 3d9c7d4c5ae135ace068ba50f6b3ae971d8e276b Mon Sep 17 00:00:00 2001 From: sotech117 Date: Wed, 20 Sep 2023 23:24:05 -0400 Subject: implement collecting all bits, if they don't come in one message --- protocol.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'protocol.h') diff --git a/protocol.h b/protocol.h index 39f26e6..aeeaa54 100644 --- a/protocol.h +++ b/protocol.h @@ -25,8 +25,7 @@ struct Welcome { struct Reply { uint8_t replyType; uint8_t stringSize; - char *string; -} __attribute__((packed)); +} reply_t __attribute__((packed)); struct Announce { uint8_t replyType; uint8_t songnameSize; @@ -36,4 +35,7 @@ struct InvalidCommand { uint8_t replyType; uint8_t replyStringSize; char *replyString; -} __attribute__((packed)); \ No newline at end of file +} __attribute__((packed)); + +int send_all(int sock, char *buf, int *len); +int recv_all(int sock, char *buf, int *len); -- cgit v1.2.3-70-g09d2