From 27b2cac69978467cbe0f14d0cb7d0439b6f95c37 Mon Sep 17 00:00:00 2001 From: azw Date: Mon, 17 Apr 2023 03:21:47 +0000 Subject: [PATCH] 1 --- server/wsproxy/GCListener.cc | 5 +++++ server/wsproxy/GCListener.h | 3 +++ server/wsproxy/app.cc | 1 + 3 files changed, 9 insertions(+) diff --git a/server/wsproxy/GCListener.cc b/server/wsproxy/GCListener.cc index 4253214..e9f210e 100644 --- a/server/wsproxy/GCListener.cc +++ b/server/wsproxy/GCListener.cc @@ -228,3 +228,8 @@ long long GCListener::GetSentBytesNum() { return tcp_listener_->sent_bytes_num; } + +void GCListener::ProcUdpPacket(a8::UdpPacket* pkt) +{ + +} diff --git a/server/wsproxy/GCListener.h b/server/wsproxy/GCListener.h index 4f036f7..79e2b1a 100644 --- a/server/wsproxy/GCListener.h +++ b/server/wsproxy/GCListener.h @@ -5,6 +5,7 @@ namespace a8 { class TcpListener; class UdpListener; + struct UdpPacket; } class KcpSession; @@ -36,6 +37,8 @@ class GCListener : public a8::Singleton long long GetSendNodeNum(); long long GetSentBytesNum(); + void ProcUdpPacket(a8::UdpPacket* pkt); + private: a8::TcpListener *tcp_listener_ = nullptr; diff --git a/server/wsproxy/app.cc b/server/wsproxy/app.cc index b7ccb2b..2a6ca60 100644 --- a/server/wsproxy/app.cc +++ b/server/wsproxy/app.cc @@ -574,6 +574,7 @@ void App::DispatchUdpMsg() while (udp_work_node_) { UdpMsgNode *pdelnode = udp_work_node_; + GCListener::Instance()->ProcUdpPacket(pdelnode->pkt); udp_work_node_ = pdelnode->next; udp_working_msgnode_size_--; if (a8::XGetTickCount() - starttick > 200) {