From ba1d9db0c90d45ee3ff88f3e9639e956be0b95c7 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 20 Aug 2020 15:12:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8D=8F=E8=AE=AE=E5=8F=B7?= =?UTF-8?q?=E4=BC=A0=E8=BE=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/tools/protobuild/ss_proto.proto | 2 ++ server/wsproxy/app.cc | 6 ++++-- server/wsproxy/mastersvrmgr.cc | 4 +++- server/wsproxy/mastersvrmgr.h | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/server/tools/protobuild/ss_proto.proto b/server/tools/protobuild/ss_proto.proto index 2f96110..fd4dd0f 100644 --- a/server/tools/protobuild/ss_proto.proto +++ b/server/tools/protobuild/ss_proto.proto @@ -18,6 +18,7 @@ message SS_CMLogin optional int32 server_id = 1; //保留 optional string team_uuid = 2; //保留 optional string account_id = 3; //账号id + optional int32 proto_version = 5; //协议版本号Constant_e.ProtoVersion } message SS_CMReconnect @@ -37,6 +38,7 @@ message SS_WSP_RequestTargetServer optional string team_id = 3; optional string server_info = 4; optional int32 is_reconnect = 5; + optional int32 proto_version = 6; //协议版本号Constant_e.ProtoVersion } message SS_MS_ResponseTargetServer diff --git a/server/wsproxy/app.cc b/server/wsproxy/app.cc index 5879bba..2a5107e 100644 --- a/server/wsproxy/app.cc +++ b/server/wsproxy/app.cc @@ -435,7 +435,8 @@ void App::ProcessClientMsg(f8::MsgHdr& hdr) msg.team_uuid(), msg.account_id(), "", - 0); + 0, + msg.proto_version()); } } break; @@ -448,7 +449,8 @@ void App::ProcessClientMsg(f8::MsgHdr& hdr) msg.team_uuid(), msg.account_id(), msg.server_info(), - 1); + 1, + 0); } } break; diff --git a/server/wsproxy/mastersvrmgr.cc b/server/wsproxy/mastersvrmgr.cc index 265cc78..0930318 100644 --- a/server/wsproxy/mastersvrmgr.cc +++ b/server/wsproxy/mastersvrmgr.cc @@ -72,7 +72,8 @@ void MasterSvrMgr::RequestTargetServer(f8::MsgHdr& hdr, const std::string& team_id, const std::string& account_id, const std::string& server_info, - int is_reconnect) + int is_reconnect, + int proto_version) { #if GAME_ID == 9003 { @@ -120,6 +121,7 @@ void MasterSvrMgr::RequestTargetServer(f8::MsgHdr& hdr, msg.set_team_id(team_uuid); msg.set_server_info(server_info); msg.set_is_reconnect(is_reconnect); + msg.set_proto_version(proto_version); svr->SendMsg(msg); pending_socket_hash_[hdr.socket_handle] = curr_context_id_; diff --git a/server/wsproxy/mastersvrmgr.h b/server/wsproxy/mastersvrmgr.h index 17ce7a0..6588771 100644 --- a/server/wsproxy/mastersvrmgr.h +++ b/server/wsproxy/mastersvrmgr.h @@ -30,7 +30,8 @@ class MasterSvrMgr : public a8::Singleton const std::string& team_id, const std::string& account_id, const std::string& server_info, - int is_reconnect); + int is_reconnect, + int proto_version); void RemoveRequest(int socket_handle, long long context_id, bool auto_free); private: