添加pong消息响应

This commit is contained in:
aozhiwei 2020-03-30 16:28:33 +08:00
parent 752c0cfd76
commit 98d2679736
3 changed files with 7 additions and 7 deletions

View File

@ -331,13 +331,6 @@ void App::DispatchMsg()
void App::ProcessGameGateMsg(f8::MsgHdr& hdr)
{
if (hdr.msgid == ss::_SS_Ping) {
#if 0
ss::SS_Pong pongmsg;
GGListener::Instance()->SendProxyMsg(hdr.socket_handle, pongmsg);
#endif
return;
}
f8::NetMsgHandler* handler = f8::GetNetMsgHandler(&HandlerMgr::Instance()->ggmsghandler,
hdr.msgid);
if (handler) {

View File

@ -44,6 +44,12 @@ void GSMgr::_SS_WSP_RequestTargetServer(f8::MsgHdr& hdr, const ss::SS_WSP_Reques
GGListener::Instance()->SendMsg(hdr.socket_handle, respmsg);
}
void GSMgr::_SS_Ping(f8::MsgHdr& hdr, const ss::SS_Ping& msg)
{
ss::SS_Pong pongmsg;
GGListener::Instance()->SendMsg(hdr.socket_handle, pongmsg);
}
void GSMgr::___GSReport(f8::JsonHttpRequest* request)
{
std::string ip = request->request.Get("ip");

View File

@ -32,6 +32,7 @@ class GSMgr : public a8::Singleton<GSMgr>
void UnInit();
void _SS_WSP_RequestTargetServer(f8::MsgHdr& hdr, const ss::SS_WSP_RequestTargetServer& msg);
void _SS_Ping(f8::MsgHdr& hdr, const ss::SS_Ping& msg);
void ___GSReport(f8::JsonHttpRequest* request);
void ___GSList(f8::JsonHttpRequest* request);