diff --git a/server/tools/protobuild/cs_msgid.proto b/server/tools/protobuild/cs_msgid.proto index 12f1737c..e8ee3827 100644 --- a/server/tools/protobuild/cs_msgid.proto +++ b/server/tools/protobuild/cs_msgid.proto @@ -3,6 +3,7 @@ package cs; //消息id定义 enum CMMessageId_e { + _CMKcpHandshake = 99; _CMPing = 101; _CMJoin = 103; @@ -31,6 +32,7 @@ enum CMMessageId_e enum SMMessageId_e { + _SMKcpHandshake = 99; _SMPing = 101; _SMRpcError = 102; _SMReconnect = 104; diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 9e3b7965..5a4a151b 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -62,6 +62,25 @@ message SMPing optional int32 param1 = 1; } +//kcp握手 +message CMKcpHandshake +{ + optional int32 proto_version = 1; //协议版本号Constant_e.ProtoVersion + optional string account_id = 2; //账号id + optional string session_id = 3; //session id + optional string team_uuid = 4; //保留 +} + +message SMKcpHandshake +{ + optional int32 errcode = 1; //errcode != 0时表示不支持kcp + optional string errmsg = 2; //errmsg + optional int32 conv = 3; //用来作为客户端的conv + optional bytes secret_key = 4; //secret key客户端每次上报的时候加在包头之前 + optional string remote_host = 5; //host + optional int32 remote_port = 6; //port +} + //rpc调用错误 message SMRpcError {