1
This commit is contained in:
parent
7e1cfb2e10
commit
adfa92a169
@ -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
|
message SS_CMLogin_CMReConnect_CommonHead
|
||||||
{
|
{
|
||||||
optional int32 server_id = 1;
|
optional int32 server_id = 1;
|
||||||
|
@ -57,12 +57,16 @@ void DownStream::OnClose()
|
|||||||
|
|
||||||
void DownStream::ProcCMMsg(f8::MsgHdr& hdr, int tag)
|
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;
|
ss::SS_Ping msg;
|
||||||
|
if (IsLongSession() && tag == ST_Tcp) {
|
||||||
GCListener::Instance()->SendMsgEx(socket_handle_, ss::_SS_CMPing, msg);
|
GCListener::Instance()->SendMsgEx(socket_handle_, ss::_SS_CMPing, msg);
|
||||||
if (!long_session_wp_.expired()) {
|
if (!long_session_wp_.expired()) {
|
||||||
long_session_wp_.lock()->UpdatePing();
|
long_session_wp_.lock()->UpdatePing();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!GetUpStream().expired()) {
|
if (!GetUpStream().expired()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user