添加消息处理程序依赖项设置和启动/停止功能,以增强网络消息处理能力

This commit is contained in:
Ayndpa
2025-11-18 21:46:31 +08:00
parent d1d26ad0f0
commit f2fde172e1
2 changed files with 31 additions and 0 deletions

View File

@@ -81,9 +81,19 @@ public:
HSteamNetConnection getConnection() const { return g_hConnection; }
ISteamNetworkingSockets* getInterface() const { return m_pInterface; }
void setMessageHandlerDependencies(boost::asio::io_context& io_context, std::map<HSteamNetConnection, std::shared_ptr<TCPClient>>& clientMap, std::mutex& clientMutex, std::unique_ptr<TCPServer>& server, int& localPort);
// Message handler
void startMessageHandler();
void stopMessageHandler();
// Update user info (ping, relay status)
void update();
// For callbacks
void setHostSteamID(CSteamID id) { g_hostSteamID = id; }
CSteamID getHostSteamID() const { return g_hostSteamID; }
friend class SteamFriendsCallbacks;
friend class SteamMatchmakingCallbacks;