This commit is contained in:
azw 2023-11-13 07:05:38 +00:00
parent 2401056ac7
commit 765b0b95cf
4 changed files with 13 additions and 13 deletions

View File

@ -176,7 +176,7 @@ bool App::HasTask()
return false;
}
void App::ProcessClientMsg(f8::MsgHdr* hdr, int tag)
void App::ProcessClientMsg(f8::MsgHdr* hdr)
{
if (hdr->msgid == ss::_SS_CMLogin ||
hdr->msgid == ss::_SS_CMReconnect ||
@ -235,12 +235,12 @@ void App::ProcessClientMsg(f8::MsgHdr* hdr, int tag)
} else {
auto down_wp = DownStreamMgr::Instance()->GetDownStream(hdr->socket_handle);
if (auto down = down_wp.lock(); !down_wp.expired()) {
down->ProcCMMsg(hdr, tag);
down->ProcCMMsg(hdr);
}
}
}
void App::ProcessMasterServerMsg(f8::MsgHdr* hdr, int tag)
void App::ProcessMasterServerMsg(f8::MsgHdr* hdr)
{
f8::NetMsgHandler* handler = f8::GetNetMsgHandler(&HandlerMgr::Instance()->msmsghandler,
hdr->msgid);
@ -253,7 +253,7 @@ void App::ProcessMasterServerMsg(f8::MsgHdr* hdr, int tag)
}
}
void App::ProcessTargetServerMsg(f8::MsgHdr* hdr, int tag)
void App::ProcessTargetServerMsg(f8::MsgHdr* hdr)
{
if (hdr->msgid == ss::_SS_ForceCloseSocket) {
GCListener::Instance()->ForceCloseClient(hdr->socket_handle);
@ -367,17 +367,17 @@ void App::DispatchSocketMsg(f8::MsgHdr* hdr)
switch (hdr->sockfrom) {
case SF_Client:
{
ProcessClientMsg(hdr, hdr->tag);
ProcessClientMsg(hdr);
}
break;
case SF_TargetServer:
{
ProcessTargetServerMsg(hdr, hdr->tag);
ProcessTargetServerMsg(hdr);
}
break;
case SF_MasterServer:
{
ProcessMasterServerMsg(hdr, hdr->tag);
ProcessMasterServerMsg(hdr);
}
break;
}

View File

@ -39,9 +39,9 @@ private:
void DispatchUdpMsg();
void ProcessClientMsg(f8::MsgHdr* hdr, int tag);
void ProcessMasterServerMsg(f8::MsgHdr* hdr, int tag);
void ProcessTargetServerMsg(f8::MsgHdr* hdr, int tag);
void ProcessClientMsg(f8::MsgHdr* hdr);
void ProcessMasterServerMsg(f8::MsgHdr* hdr);
void ProcessTargetServerMsg(f8::MsgHdr* hdr);
void FreeUdpMsgQueue();

View File

@ -73,9 +73,9 @@ void DownStream::OnClose()
}
}
void DownStream::ProcCMMsg(f8::MsgHdr* hdr, int tag)
void DownStream::ProcCMMsg(f8::MsgHdr* hdr)
{
if (hdr->msgid == ss::_SS_CMPing && IsLongSession() && tag == ST_Tcp) {
if (hdr->msgid == ss::_SS_CMPing && IsLongSession() && hdr->tag == ST_Tcp) {
ss::SS_SMPing msg;
GCListener::Instance()->SendMsgEx(socket_handle_, ss::_SS_CMPing, msg);
if (!long_session_wp_.expired()) {

View File

@ -12,7 +12,7 @@ class DownStream
std::weak_ptr<UpStream> GetUpStream() const { return up_; }
void ReBindUpStream(std::weak_ptr<UpStream> up);
bool IsLongSession() { return is_long_session_; }
void ProcCMMsg(f8::MsgHdr* hdr, int tag);
void ProcCMMsg(f8::MsgHdr* hdr);
void ForwardUpStreamMsg(f8::MsgHdr* hdr);
void OnClose();