aboutsummaryrefslogtreecommitdiff
path: root/protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocol.h')
-rw-r--r--protocol.h8
1 files changed, 5 insertions, 3 deletions
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);