添加协议号传输

This commit is contained in:
aozhiwei 2020-08-20 15:12:51 +08:00
parent b97d4db75f
commit ba1d9db0c9
4 changed files with 11 additions and 4 deletions

View File

@ -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

View File

@ -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;

View File

@ -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_;

View File

@ -30,7 +30,8 @@ class MasterSvrMgr : public a8::Singleton<MasterSvrMgr>
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: