diff --git a/server/wsproxy/app.cc b/server/wsproxy/app.cc index dd6a0d1..f5de7da 100644 --- a/server/wsproxy/app.cc +++ b/server/wsproxy/app.cc @@ -264,7 +264,12 @@ void App::ProcessTargetServerMsg(f8::MsgHdr* hdr) GCListener::Instance()->MarkClient(hdr->socket_handle, true); } if (hdr->msgid == ss::_SS_HttpTunnelResponse) { - + ss::SS_HttpTunnelResponse msg; + bool ok = msg.ParseFromArray(hdr->buf + hdr->offset, hdr->buflen - hdr->offset); + if (ok) { + MasterMgr::Instance()->_SS_HttpTunnelResponse(hdr, msg); + } + return; } auto down_wp = DownStreamMgr::Instance()->GetDownStream(hdr->socket_handle); if (!down_wp.expired()) { diff --git a/server/wsproxy/mastermgr.cc b/server/wsproxy/mastermgr.cc index ce77cc9..b3279b3 100644 --- a/server/wsproxy/mastermgr.cc +++ b/server/wsproxy/mastermgr.cc @@ -135,6 +135,11 @@ void MasterMgr::_SS_MS_HttpTunnelResponse(f8::MsgHdr* hdr, const ss::SS_MS_HttpT } } +void MasterMgr::_SS_HttpTunnelResponse(f8::MsgHdr* hdr, const ss::SS_HttpTunnelResponse& msg) +{ + +} + std::shared_ptr MasterMgr::GetConnById(int instance_id) { auto itr = mastersvr_hash_.find(instance_id); diff --git a/server/wsproxy/mastermgr.h b/server/wsproxy/mastermgr.h index 567aeda..95a2f0f 100644 --- a/server/wsproxy/mastermgr.h +++ b/server/wsproxy/mastermgr.h @@ -9,6 +9,7 @@ namespace ss { class SS_MS_ResponseTargetServer; class SS_MS_HttpTunnelResponse; + class SS_HttpTunnelResponse; } struct HttpTunnelRequest; @@ -30,6 +31,7 @@ class MasterMgr : public a8::Singleton void _SS_MS_ResponseTargetServer(f8::MsgHdr* hdr, const ss::SS_MS_ResponseTargetServer& msg); void _SS_MS_HttpTunnelResponse(f8::MsgHdr* hdr, const ss::SS_MS_HttpTunnelResponse& msg); + void _SS_HttpTunnelResponse(f8::MsgHdr* hdr, const ss::SS_HttpTunnelResponse& msg); void RequestTargetServer(f8::MsgHdr* hdr, const std::string& team_id, const std::string& account_id,