From 1e69ce8110860091fe80222f1bf0c947ed96c5b2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 24 May 2019 10:58:00 +0800 Subject: [PATCH] dsaff --- server/tools/protobuild/ss_msgid.proto | 4 ++-- server/wsproxy/gameclientmgr.cc | 2 +- server/wsproxy/target_conn.cc | 4 +++- server/wsproxy/target_conn.h | 8 ++------ third_party/a8engine | 2 +- third_party/framework | 2 +- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/server/tools/protobuild/ss_msgid.proto b/server/tools/protobuild/ss_msgid.proto index 55b8f45..25fbe40 100644 --- a/server/tools/protobuild/ss_msgid.proto +++ b/server/tools/protobuild/ss_msgid.proto @@ -3,6 +3,8 @@ package ss; //消息id定义 enum SSMessageId_e { + _SS_Ping = 8; + _SS_Pong = 9; _SS_WSP_SocketDisconnect = 10; _SS_CMPing = 101; @@ -10,6 +12,4 @@ enum SSMessageId_e _SS_CMLogin = 103; _SS_CMReConnect = 104; - _SS_Ping = 150; - _SS_Pong = 151; } diff --git a/server/wsproxy/gameclientmgr.cc b/server/wsproxy/gameclientmgr.cc index 7a22c83..a25a338 100644 --- a/server/wsproxy/gameclientmgr.cc +++ b/server/wsproxy/gameclientmgr.cc @@ -22,7 +22,7 @@ void GameClientMgr::OnClientDisconnect(a8::XParams& param) if (client) { if (client->conn) { ss::SS_WSP_SocketDisconnect msg; - client->conn->SendMsg(msg); + client->conn->SendMsg(param.sender, msg); } socket_hash_.erase(param.sender); delete client; diff --git a/server/wsproxy/target_conn.cc b/server/wsproxy/target_conn.cc index 41a63bc..395baa2 100644 --- a/server/wsproxy/target_conn.cc +++ b/server/wsproxy/target_conn.cc @@ -166,7 +166,9 @@ void TargetConn::CheckAlive() Open(); } else { ss::SS_Ping msg; - SendMsg(msg); + #if 0 + SendMsg(0, msg); + #endif } } } diff --git a/server/wsproxy/target_conn.h b/server/wsproxy/target_conn.h index 3660e38..47b2fdd 100644 --- a/server/wsproxy/target_conn.h +++ b/server/wsproxy/target_conn.h @@ -26,14 +26,10 @@ class TargetConn bool Connected(); template - void SendMsg(T& msg) + void SendMsg(int socket_handle, T& msg) { static int msgid = f8::Net_GetMessageId(msg); - #if 1 - f8::Net_SendProxyCMsg(tcp_client_, msgid, msg); - #else - f8::Net_SendMsg(tcp_client_, 0, msgid, msg); - #endif + f8::Net_SendProxyCMsg(tcp_client_, socket_handle, msgid, msg); } void ForwardClientMsg(f8::MsgHdr& hdr); diff --git a/third_party/a8engine b/third_party/a8engine index bc1e1e0..ff8c006 160000 --- a/third_party/a8engine +++ b/third_party/a8engine @@ -1 +1 @@ -Subproject commit bc1e1e002cdfbbac07abdf14151afb0bbd8025a8 +Subproject commit ff8c00652d5367595c4adee8f95306ae1a46236b diff --git a/third_party/framework b/third_party/framework index 1813384..780734e 160000 --- a/third_party/framework +++ b/third_party/framework @@ -1 +1 @@ -Subproject commit 18133846b6672634219c080064b7a24720d17588 +Subproject commit 780734e98003e146da7a9b5c4d28d098c54edc5a