重构MultiplexManager和TCPServer,优化客户端管理和连接逻辑,添加异步读取和错误处理
This commit is contained in:
@@ -19,6 +19,8 @@ public:
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
std::shared_ptr<MultiplexManager> getMultiplexManager(HSteamNetConnection conn);
|
||||
|
||||
private:
|
||||
void run();
|
||||
void pollMessages();
|
||||
@@ -33,6 +35,7 @@ private:
|
||||
std::map<HSteamNetConnection, std::shared_ptr<MultiplexManager>> multiplexManagers_;
|
||||
|
||||
std::thread thread_;
|
||||
std::thread io_thread_;
|
||||
bool running_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user