This commit is contained in:
aozhiwei 2024-03-24 20:37:23 +08:00
parent 57b3842f62
commit 573e381c4b
5 changed files with 45 additions and 0 deletions

View File

@ -99,6 +99,11 @@ void GSMgr::_SS_WSP_RequestTargetServer(f8::MsgHdr* hdr, const ss::SS_WSP_Reques
GGListener::Instance()->SendMsg(hdr->socket_handle, respmsg);
}
void GSMgr::_SS_WSP_HttpTunnelRequest(f8::MsgHdr* hdr, const ss::SS_WSP_HttpTunnelRequest& msg)
{
}
void GSMgr::_SS_Ping(f8::MsgHdr* hdr, const ss::SS_Ping& msg)
{
ss::SS_Pong pongmsg;

View File

@ -5,6 +5,7 @@
namespace ss
{
class SS_WSP_RequestTargetServer;
class SS_WSP_HttpTunnelRequest;
class SS_Ping;
}
@ -24,6 +25,7 @@ class GSMgr : public a8::Singleton<GSMgr>
void UnInit();
void _SS_WSP_RequestTargetServer(f8::MsgHdr* hdr, const ss::SS_WSP_RequestTargetServer& msg);
void _SS_WSP_HttpTunnelRequest(f8::MsgHdr* hdr, const ss::SS_WSP_HttpTunnelRequest& msg);
void _SS_Ping(f8::MsgHdr* hdr, const ss::SS_Ping& msg);
void ___GSReport(std::shared_ptr<f8::JsonHttpRequest> request);

View File

@ -62,6 +62,7 @@ void HandlerMgr::UnInit()
void HandlerMgr::RegisterNetMsgHandlers()
{
RegisterNetMsgHandler(&ggmsghandler, &GSMgr::_SS_WSP_RequestTargetServer);
RegisterNetMsgHandler(&ggmsghandler, &GSMgr::_SS_WSP_HttpTunnelRequest);
RegisterNetMsgHandler(&ggmsghandler, &GSMgr::_SS_Ping);
}

View File

@ -10,5 +10,9 @@ enum SSMessageId_e
_SS_WSP_RequestTargetServer = 11;
_SS_MS_ResponseTargetServer = 12;
_SS_ForceCloseSocket = 13;
_SS_WSP_HttpTunnelRequest = 14;
_SS_MS_HttpTunnelResponse = 15;
_SS_HttpTunnelRequest = 16;
_SS_HttpTunnelResponse = 17;
}

View File

@ -39,3 +39,36 @@ message SS_MS_ResponseTargetServer
message SS_ForceCloseSocket
{
}
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_HttpTunnelRequest
{
optional int64 context_id = 1;
optional int32 socket_handle = 2;
optional string url = 3;
optional string query_str = 4;
}
message SS_HttpTunnelResponse
{
optional int32 error_code = 1;
optional string error_msg = 2;
optional int64 context_id = 3;
optional int32 socket_handle = 4;
optional string response = 5;
}