summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorMikhail Burakov <mburakov@mailbox.org>2024-05-12 15:05:50 +0200
committerMikhail Burakov <mburakov@mailbox.org>2024-05-12 15:05:50 +0200
commitd511fae02fba6f6c8ea2896d5a6cefd8d3337ca3 (patch)
tree966f39c3fe988c96f75e5220cd10e4a8b6fdf0e5 /proto.h
parent918682faa29197fe3b0a544906638e02785a6b17 (diff)
Add generic proto writing method
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index c8c4d0b..62f65d5 100644
--- a/proto.h
+++ b/proto.h
@@ -20,6 +20,7 @@
#include <assert.h>
#include <stdint.h>
+#include <stdbool.h>
#define PROTO_TYPE_MISC 0
#define PROTO_TYPE_VIDEO 1
@@ -38,4 +39,6 @@ struct Proto {
static_assert(sizeof(struct Proto) == 8 * sizeof(uint8_t),
"Suspicious proto struct size");
+bool WriteProto(int fd, const struct Proto* proto, const void* data);
+
#endif // STREAMER_PROTO_H_