From 02c09a9a3bb5c7c933384c3cabc5915acad9da78 Mon Sep 17 00:00:00 2001 From: Ryan <80224521+Rxann@users.noreply.github.com> Date: Tue, 25 Jun 2024 10:57:35 -0400 Subject: [PATCH] InFrame (#15) * Migrate InFrame * Format(ish) netServerMessages --- network/InFrame.hpp | 29 +++++++++++++++++++++++++++++ network/netServerMessages.hpp | 14 +++++++++----- 2 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 network/InFrame.hpp diff --git a/network/InFrame.hpp b/network/InFrame.hpp new file mode 100644 index 0000000..5a4eb9a --- /dev/null +++ b/network/InFrame.hpp @@ -0,0 +1,29 @@ +#pragma once +#include + +namespace rage +{ +#pragma pack(push, 8) +class InFrame +{ +public: + enum class EventType + { + ConnectionClosed = 4, + FrameReceived = 5, + BandwidthExceeded = 6, + OutOfMemory = 7 + }; + + virtual ~InFrame() = default; + + virtual void Destroy() = 0; + virtual EventType GetEventType() = 0; + virtual uint32_t _0x18() = 0; + + char pad_0[0x70]; // 0x8 + uint32_t m_Length; // 0x78 + void *m_Data; // 0x80 +}; +#pragma pack(pop) +} \ No newline at end of file diff --git a/network/netServerMessages.hpp b/network/netServerMessages.hpp index c0d0930..ed74fbf 100644 --- a/network/netServerMessages.hpp +++ b/network/netServerMessages.hpp @@ -1,8 +1,10 @@ #pragma once #include -namespace rage { -class ServerRPCSerializer { +namespace rage +{ +class ServerRPCSerializer +{ public: virtual int dtor() = 0; virtual int Unk() = 0; @@ -10,14 +12,16 @@ public: virtual int GetSize() = 0; }; -class ServerMsgData { +class ServerMsgData +{ public: unsigned char *data; int size; bool is_json; }; -class ServerMsg { +class ServerMsg +{ public: virtual ~ServerMsg() = default; virtual void _0x08() = 0; @@ -36,4 +40,4 @@ public: virtual void _0x70() = 0; virtual ServerMsgData *GetMsgData() = 0; }; -} // namespace rage \ No newline at end of file +} \ No newline at end of file