This commit is contained in:
aozhiwei 2024-03-24 13:27:29 +08:00
parent 42ca63e9a2
commit 09ad4bea1d
5 changed files with 26 additions and 0 deletions

View File

@ -9,6 +9,8 @@ enum SSMessageId_e
_SS_WSP_RequestTargetServer = 11;
_SS_MS_ResponseTargetServer = 12;
_SS_ForceCloseSocket = 13;
_SS_WSP_HttpTunnelRequest = 14;
_SS_MS_HttpTunnelResponse = 15;
_SS_CMKcpHandshake = 99;
_SS_CMPing = 101;

View File

@ -78,6 +78,22 @@ message SS_MS_ResponseTargetServer
optional int32 port = 5;
}
message SS_WSP_HttpTunnelRequest
{
optional int64 context_id = 1;
optional string url = 7;
optional string query_str = 8;
}
message SS_MS_HttpTunnelResponse
{
optional int32 error_code = 1;
optional string error_msg = 2;
optional int64 context_id = 3;
optional string host = 4;
optional int32 port = 5;
}
message SS_SMRpcError
{
optional int32 error_code = 1;

View File

@ -85,6 +85,7 @@ void HandlerMgr::UnInit()
void HandlerMgr::RegisterNetMsgHandlers()
{
RegisterNetMsgHandler(&msmsghandler, &MasterMgr::_SS_MS_ResponseTargetServer);
RegisterNetMsgHandler(&msmsghandler, &MasterMgr::_SS_MS_HttpTunnelResponse);
}
void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,

View File

@ -95,6 +95,11 @@ void MasterMgr::_SS_MS_ResponseTargetServer(f8::MsgHdr* hdr, const ss::SS_MS_Res
}
}
void MasterMgr::_SS_MS_HttpTunnelResponse(f8::MsgHdr* hdr, const ss::SS_MS_HttpTunnelResponse& msg)
{
}
std::shared_ptr<Master> MasterMgr::GetConnById(int instance_id)
{
auto itr = mastersvr_hash_.find(instance_id);

View File

@ -8,6 +8,7 @@ namespace f8
namespace ss
{
class SS_MS_ResponseTargetServer;
class SS_MS_HttpTunnelResponse;
}
class RequestTarget;
@ -27,6 +28,7 @@ class MasterMgr : public a8::Singleton<MasterMgr>
void UnInit();
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 RequestTargetServer(f8::MsgHdr* hdr,
const std::string& team_id,
const std::string& account_id,