R-Type
2
Doom but in better
Loading...
Searching...
No Matches
message.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <cstdint>
3
#include <vector>
4
9
struct
Message
{
10
uint8_t
type
;
11
std::vector<uint8_t>
payload
;
12
};
13
14
// In your case, 'type' might match the 'messageType' enum from GameMessage.hpp.
15
// You can define: CONNECT=1, DISCONNECT=2, MOVE=3, etc. or directly use the enum's values.
Message
Minimal network message with a 4-byte header (type + length) and a payload.
Definition
message.hpp:9
Message::type
uint8_t type
Could map to messageType in GameMessage.hpp (CONNECT, DISCONNECT, etc.)
Definition
message.hpp:10
Message::payload
std::vector< uint8_t > payload
Arbitrary payload bytes.
Definition
message.hpp:11
server
src
message.hpp
Generated on Thu Feb 6 2025 22:34:21 for R-Type by
1.12.0