From c8b5f47c808eb88dce70120536a769a3d11ebd08 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:12:55 +0100 Subject: [PATCH] Add packet header flags --- r5dev/common/protocol.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/r5dev/common/protocol.h b/r5dev/common/protocol.h index 5661c323..73beca64 100644 --- a/r5dev/common/protocol.h +++ b/r5dev/common/protocol.h @@ -40,3 +40,11 @@ enum class PERSISTENCE : int #define net_NOP 0 // nop command used for padding. #define net_Disconnect 1 // disconnect, last message in connection. + +// each channel packet has 1 byte of FLAG bits +#define PACKET_FLAG_RELIABLE (1<<0) // packet contains subchannel stream data +#define PACKET_FLAG_COMPRESSED (1<<1) // packet is compressed +#define PACKET_FLAG_ENCRYPTED (1<<2) // packet is encrypted +#define PACKET_FLAG_SPLIT (1<<3) // packet is split +#define PACKET_FLAG_CHOKED (1<<4) // packet was choked by sender +