Clean up socket management

This commit is contained in:
HikikoMarmy
2025-07-03 18:16:11 +01:00
parent 0bbe5f1d1e
commit 414f3f9e8b
5 changed files with 68 additions and 106 deletions

View File

@@ -29,6 +29,7 @@
/* 0027 */ #include "Event/RequestGetEncryptionKey.h"
/* 0041 */ #include "Event/NotifyForcedLogout.h"
/* 0042 */ #include "Event/RequestGetRules.h"
/* 0043 */ #include "Event/RequestGetServerAddress.h"
/* 0044 */ #include "Event/RequestUpdateGameData.h"

View File

@@ -14,6 +14,7 @@ RealmSocket::RealmSocket()
flag.disconnected_wait = 0;
flag.disconnected_forced = 0;
flag.is_listener = 0;
flag.is_gateway = 0;
flag.want_more_read_data = 0;
flag.want_more_write_data = 0;
@@ -43,6 +44,7 @@ RealmSocket::~RealmSocket()
flag.disconnected_wait = 0;
flag.disconnected_forced = 0;
flag.is_listener = 0;
flag.is_gateway = 0;
flag.want_more_read_data = 0;
flag.want_more_write_data = 0;

View File

@@ -40,6 +40,7 @@ public:
bool disconnected_wait;
bool disconnected_forced;
bool is_listener;
bool is_gateway;
bool want_more_read_data;
bool want_more_write_data;
} flag;
@@ -51,8 +52,8 @@ public:
std::string remote_ip;
uint32_t remote_port;
uint32_t last_write_position;
uint64_t latency;
std::chrono::steady_clock::time_point last_recv_time;
std::chrono::steady_clock::time_point last_send_time;