This commit is contained in:
azw 2023-04-25 05:59:41 +00:00
parent 7e1cfb2e10
commit adfa92a169
2 changed files with 13 additions and 4 deletions

View File

@ -8,6 +8,11 @@ message SS_CMPing
{
}
message SS_SMPing
{
optional int32 param1 = 1; optional int32 source = 2 [default = 0]; //0:tcp 1:udp
}
message SS_CMLogin_CMReConnect_CommonHead
{
optional int32 server_id = 1;

View File

@ -57,11 +57,15 @@ void DownStream::OnClose()
void DownStream::ProcCMMsg(f8::MsgHdr& hdr, int tag)
{
if (hdr.msgid == ss::_SS_CMPing && IsLongSession() && tag == ST_Tcp) {
if (hdr.msgid == ss::_SS_CMPing) {
ss::SS_Ping msg;
GCListener::Instance()->SendMsgEx(socket_handle_, ss::_SS_CMPing, msg);
if (!long_session_wp_.expired()) {
long_session_wp_.lock()->UpdatePing();
if (IsLongSession() && tag == ST_Tcp) {
GCListener::Instance()->SendMsgEx(socket_handle_, ss::_SS_CMPing, msg);
if (!long_session_wp_.expired()) {
long_session_wp_.lock()->UpdatePing();
}
} else {
}
return;
}