增强MultiplexManager构造函数,添加io_context、isHost和localPort参数,并在TCPServer中相应更新

This commit is contained in:
Ayndpa
2025-11-19 17:12:12 +08:00
parent f661b1d369
commit 7ace8bbb3c
3 changed files with 29 additions and 4 deletions

View File

@@ -15,7 +15,8 @@ bool TCPServer::start() {
acceptor_.bind(endpoint);
acceptor_.listen();
multiplexManager_ = std::make_unique<MultiplexManager>(manager_->getInterface(), manager_->getConnection());
multiplexManager_ = std::make_unique<MultiplexManager>(manager_->getInterface(), manager_->getConnection(),
io_context_, manager_->getIsHost(), *manager_->getLocalPort());
running_ = true;
serverThread_ = std::thread([this]() {