R-Type 0.1
Loading...
Searching...
No Matches
MessageParser.hpp
1#pragma once
2
8#include "MessageHeader.hpp"
9#include "PacketReader.hpp"
10
11#include <cstdint>
12#include <vector>
13
19 std::vector<std::uint8_t> payload;
20};
21
26public:
33 static bool parse(PacketReader &reader, std::vector<ParsedMessage> &messages);
34};
35
Splits the body of a connected packet into messages.
Definition MessageParser.hpp:25
static bool parse(PacketReader &reader, std::vector< ParsedMessage > &messages)
Parses every message until the end of the reader.
Definition MessageParser.cpp:4
Bounds checked reader of big-endian values over a byte buffer.
Definition PacketReader.hpp:15
std::uint16_t MessageId
Numeric identifier of a message type.
Definition MessageHeader.hpp:14
Message extracted from a connected packet.
Definition MessageParser.hpp:17
std::vector< std::uint8_t > payload
Raw payload bytes.
Definition MessageParser.hpp:19
MessageId type
Message type identifier.
Definition MessageParser.hpp:18