packet_recorder.h

main 19 lines · 430 bytes Raw
Alex Alex Commit Client Upload Part 2 19/10/2026 00:06
1#pragma once
2
3#include <framework/net/inputmessage.h>
4#include <framework/net/outputmessage.h>
5
6class PacketRecorder : public LuaObject {
7public:
8 PacketRecorder(const std::string& file);
9 virtual ~PacketRecorder();
10
11 void addInputPacket(const InputMessagePtr& packet);
12 void addOutputPacket(const OutputMessagePtr& packet);
13
14private:
15 ticks_t m_start;
16 std::ofstream m_stream;
17 bool m_firstOutput = true;
18};
19
Top