From 026bbfaf2b5d73a26b8e2fa49158883ef64c211b Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期四, 27 五月 2021 13:51:26 +0800 Subject: [PATCH] tcp server call center to send proxy requests. --- box/center.cpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/box/center.cpp b/box/center.cpp index c3a03e3..8d24315 100644 --- a/box/center.cpp +++ b/box/center.cpp @@ -18,6 +18,7 @@ #include "center.h" #include "center_topic_node.h" #include "node_center.h" +#include "tcp_server.h" #include <chrono> using namespace std::chrono; @@ -175,6 +176,7 @@ } topic_node_.reset(new CenterTopicNode(center_ptr, shm)); + tcp_server_.reset(new TcpServer(kBHCenterPort, center_ptr)); } BHCenter::~BHCenter() { Stop(); } @@ -186,11 +188,13 @@ sockets_[info.name_]->Start(1, info.handler_, info.raw_handler_, info.idle_); } topic_node_->Start(); + tcp_server_->Start(); return true; } bool BHCenter::Stop() { + tcp_server_->Stop(); topic_node_->Stop(); for (auto &kv : sockets_) { kv.second->Stop(); -- Gitblit v1.8.0