2021-12-05 17:54:36 +00:00
|
|
|
#ifndef PACKETUTILS_H
|
|
|
|
#define PACKETUTILS_H
|
|
|
|
|
2024-01-05 12:33:52 +00:00
|
|
|
#include "MessageIdentifiers.h"
|
|
|
|
#include "BitStream.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
#include <string>
|
|
|
|
|
2023-05-03 21:38:32 +00:00
|
|
|
enum class eConnectionType : uint16_t;
|
|
|
|
|
2021-12-05 17:54:36 +00:00
|
|
|
namespace PacketUtils {
|
2023-09-21 01:06:28 +00:00
|
|
|
uint16_t ReadU16(uint32_t startLoc, Packet* packet);
|
|
|
|
uint32_t ReadU32(uint32_t startLoc, Packet* packet);
|
|
|
|
uint64_t ReadU64(uint32_t startLoc, Packet* packet);
|
|
|
|
int64_t ReadS64(uint32_t startLoc, Packet* packet);
|
2022-07-28 13:39:57 +00:00
|
|
|
std::string ReadString(uint32_t startLoc, Packet* packet, bool wide, uint32_t maxLen = 33);
|
|
|
|
void SavePacket(const std::string& filename, const char* data, size_t length);
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PACKETUTILS_H
|