This commit is contained in:
azw 2023-11-24 09:02:51 +00:00
parent fc87c6c040
commit be96e0c0d5
7 changed files with 14 additions and 13 deletions

View File

@ -35,7 +35,8 @@ public:
p->msgid,
p->seqid,
&buf[offset + sizeof(f8::PackHead)],
p->packlen);
p->packlen,
0);
offset += sizeof(f8::PackHead) + p->packlen;
} else {
warning = true;
@ -87,7 +88,7 @@ static void GSListeneron_error(a8::TcpListener*, int type, int errorid)
void GGListener::Init()
{
tcp_listener_ = std::make_shared<a8::TcpListener>();
tcp_listener_->RegisterSessionClass<GGClientSession>();
tcp_listener_->RegisterSessionClass<GGClientSession>(1024 * 64);
tcp_listener_->on_error = GSListeneron_error;
tcp_listener_->bind_address = "0.0.0.0";

View File

@ -63,7 +63,7 @@ void App::UnInit()
HandlerMgr::Instance()->UnInit();
}
void App::Update()
void App::Update(int delta_time)
{
QuickExecute();
SlowerExecute();
@ -90,7 +90,7 @@ void App::ProcessGameGateMsg(f8::MsgHdr* hdr)
if (handler) {
switch (handler->handlerid) {
case HID_GSMgr:
ProcessNetMsg(handler, GSMgr::Instance(), *hdr);
ProcessNetMsg(handler, GSMgr::Instance(), hdr);
break;
}
}

View File

@ -21,7 +21,7 @@ public:
virtual const std::string GetPkgName() override;
virtual void Init() override;
virtual void UnInit() override;
virtual void Update() override;
virtual void Update(int delta_time) override;
virtual bool HasTask() override;
virtual void DispatchSocketMsg(f8::MsgHdr* hdr) override;

View File

@ -51,7 +51,7 @@ void GSMgr::UnInit()
}
void GSMgr::_SS_WSP_RequestTargetServer(f8::MsgHdr& hdr, const ss::SS_WSP_RequestTargetServer& msg)
void GSMgr::_SS_WSP_RequestTargetServer(f8::MsgHdr* hdr, const ss::SS_WSP_RequestTargetServer& msg)
{
ss::SS_MS_ResponseTargetServer respmsg;
respmsg.set_context_id(msg.context_id());
@ -92,13 +92,13 @@ void GSMgr::_SS_WSP_RequestTargetServer(f8::MsgHdr& hdr, const ss::SS_WSP_Reques
}
}
}
GGListener::Instance()->SendMsg(hdr.socket_handle, respmsg);
GGListener::Instance()->SendMsg(hdr->socket_handle, respmsg);
}
void GSMgr::_SS_Ping(f8::MsgHdr& hdr, const ss::SS_Ping& msg)
void GSMgr::_SS_Ping(f8::MsgHdr* hdr, const ss::SS_Ping& msg)
{
ss::SS_Pong pongmsg;
GGListener::Instance()->SendMsg(hdr.socket_handle, pongmsg);
GGListener::Instance()->SendMsg(hdr->socket_handle, pongmsg);
}
void GSMgr::___GSReport(std::shared_ptr<f8::JsonHttpRequest> request)

View File

@ -23,8 +23,8 @@ class GSMgr : public a8::Singleton<GSMgr>
void Init();
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 _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(std::shared_ptr<f8::JsonHttpRequest> request);
void ___GSList(std::shared_ptr<f8::JsonHttpRequest> request);

2
third_party/a8 vendored

@ -1 +1 @@
Subproject commit 56f576e60d471f0390d12172cf2aa499c0772e93
Subproject commit 380074e2f78043a71b134c420af20b00127b1967

2
third_party/f8 vendored

@ -1 +1 @@
Subproject commit 1c141d8817c21820eb0e79aad3279245a8a72866
Subproject commit b172c94f398c782d53a3147250c71e3c0eafe890