feat(net): add NETEVENTQUEUE dtor

This commit is contained in:
fallenoak committed 2025-10-10 20:06:58 -05:00
1 parent 93edfe896e
commit b925836c2c
2 files changed
+14

No files matched your search

+12
View File
@@ -20,6 +20,10 @@ void InitializePropContext() {
}
}
NETEVENTQUEUE::~NETEVENTQUEUE() {
this->Clear();
}
void NETEVENTQUEUE::AddEvent(EVENTID eventId, void* conn, NetClient* client, const void* data, uint32_t bytes) {
this->m_critSect.Enter();
@@ -43,6 +47,14 @@ void NETEVENTQUEUE::AddEvent(EVENTID eventId, void* conn, NetClient* client, con
this->m_critSect.Leave();
}
void NETEVENTQUEUE::Clear() {
this->m_critSect.Enter();
this->m_eventQueue.Clear();
this->m_critSect.Leave();
}
void NETEVENTQUEUE::Poll() {
this->m_critSect.Enter();
+2
View File
@@ -41,7 +41,9 @@ class NETEVENTQUEUE {
NETEVENTQUEUE(NetClient* client)
: m_client(client)
{};
~NETEVENTQUEUE();
void AddEvent(EVENTID eventId, void* conn, NetClient* client, const void* data, uint32_t bytes);
void Clear();
void Poll();
};