mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 16:30:15 +00:00
Optimize logging and make world packet parser callback-safe
This commit is contained in:
parent
85c8b5d5f4
commit
4ea4cb761c
5 changed files with 49 additions and 27 deletions
|
|
@ -74,6 +74,7 @@ private:
|
|||
std::mutex mutex;
|
||||
std::ofstream fileStream;
|
||||
bool fileReady = false;
|
||||
bool echoToStdout_ = true;
|
||||
std::chrono::steady_clock::time_point lastFlushTime_{};
|
||||
uint32_t flushIntervalMs_ = 250;
|
||||
void ensureFile();
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ public:
|
|||
Packet() = default;
|
||||
explicit Packet(uint16_t opcode);
|
||||
Packet(uint16_t opcode, const std::vector<uint8_t>& data);
|
||||
Packet(uint16_t opcode, std::vector<uint8_t>&& data);
|
||||
|
||||
void writeUInt8(uint8_t value);
|
||||
void writeUInt16(uint16_t value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue