mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Harden packet framing/logging and checkpoint current workspace state
This commit is contained in:
parent
4b48fcdab2
commit
615efd01b7
9 changed files with 290 additions and 147 deletions
|
|
@ -18,10 +18,10 @@ namespace network {
|
|||
*
|
||||
* Key Differences from Auth Server:
|
||||
* - Outgoing: 6-byte header (2 bytes size + 4 bytes opcode, big-endian)
|
||||
* - Incoming: 4-byte header (2 bytes size + 2 bytes opcode, big-endian)
|
||||
* - Incoming: 4-byte header (2 bytes size + 2 bytes opcode)
|
||||
* - Headers are RC4-encrypted after CMSG_AUTH_SESSION
|
||||
* - Packet bodies remain unencrypted
|
||||
* - Size field is payload size only (does NOT include header)
|
||||
* - Size field includes opcode bytes (payloadLen = size - 2)
|
||||
*/
|
||||
class WorldSocket : public Socket {
|
||||
public:
|
||||
|
|
@ -89,6 +89,9 @@ private:
|
|||
// This prevents re-decrypting the same header when waiting for more data
|
||||
size_t headerBytesDecrypted = 0;
|
||||
|
||||
// Debug-only tracing window for post-auth packet framing verification.
|
||||
int headerTracePacketsLeft = 0;
|
||||
|
||||
// Packet callback
|
||||
std::function<void(const Packet&)> packetCallback;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue