Added sync code to client ordered list

This commit is contained in:
Yousef Khadadeh 2025-12-09 13:00:38 +03:00
parent c51b7e7eb1
commit 9649135f43
16 changed files with 233 additions and 143 deletions

View file

@ -177,3 +177,11 @@ void NetClient::send_str_as_bytes(std::shared_ptr<rtc::DataChannel> channel, con
void NetClient::add_recv_callback(MessageCommandType commandID, const NetClientRecvCallback& callback) {
recvCallbacks[commandID] = callback;
}
NetClient::~NetClient() {
if(directConnectServer) {
directConnectServer->directConnectClient = nullptr;
std::erase(directConnectServer->clients, directConnectServer->directConnectClientData);
directConnectServer->directConnectClientData = nullptr;
}
}