diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-09-20 23:24:05 -0400 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2023-09-20 23:24:05 -0400 |
commit | 3d9c7d4c5ae135ace068ba50f6b3ae971d8e276b (patch) | |
tree | 5e391492380af5fb351d543d8fd6b17ad5871afe /protocol.h | |
parent | 362250d1cb923d9ced8ea51508ace50b76050b06 (diff) |
implement collecting all bits, if they don't come in one message
Diffstat (limited to 'protocol.h')
-rw-r--r-- | protocol.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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); |