From d8987e654bf718826309981e516d686260c69d5d Mon Sep 17 00:00:00 2001 From: azw Date: Wed, 22 Nov 2023 00:22:50 +0000 Subject: [PATCH] 1 --- server/stat/proto/ss_msgid.proto | 19 ++++++ server/stat/proto/ss_proto.proto | 101 +++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 server/stat/proto/ss_msgid.proto create mode 100644 server/stat/proto/ss_proto.proto diff --git a/server/stat/proto/ss_msgid.proto b/server/stat/proto/ss_msgid.proto new file mode 100644 index 0000000..c6868a6 --- /dev/null +++ b/server/stat/proto/ss_msgid.proto @@ -0,0 +1,19 @@ +package ss; + +//消息id定义 +enum SSMessageId_e +{ + _SS_Ping = 8; + _SS_Pong = 9; + _SS_WSP_SocketDisconnect = 10; + _SS_WSP_RequestTargetServer = 11; + _SS_MS_ResponseTargetServer = 12; + _SS_ForceCloseSocket = 13; + + _SS_CMKcpHandshake = 99; + _SS_CMPing = 101; + _SS_SMRpcError = 102; + _SS_CMLogin = 103; + _SS_CMReconnect = 104; + +} diff --git a/server/stat/proto/ss_proto.proto b/server/stat/proto/ss_proto.proto new file mode 100644 index 0000000..1c6ed51 --- /dev/null +++ b/server/stat/proto/ss_proto.proto @@ -0,0 +1,101 @@ +package ss; + +message SS_WSP_SocketDisconnect +{ +} + +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 +{ + optional int32 server_id = 1; +} + +message SS_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; //保留 + optional int32 secret_key_place = 5; //私钥存放位置 0:存在用户协议前(老) 1:存在kcp底层协议头之后(新) +} + +message SS_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 +} + +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 + optional string session_id = 20; //账号id +} + +message SS_CMReconnect +{ + optional int32 server_id = 1; //保留 + optional string team_uuid = 2; //保留 + optional string account_id = 3; //账号id + optional string session_id = 4; //session_id + optional string room_uuid = 5; //房间唯一id + optional string server_info = 6; //服务器信息 +} + +message SS_WSP_RequestTargetServer +{ + optional int64 context_id = 1; + optional string account_id = 2; + optional string team_id = 3; + optional string server_info = 4; + optional int32 is_reconnect = 5; + optional int32 proto_version = 6; //协议版本号Constant_e.ProtoVersion + optional string url = 7; + optional string query_str = 8; + optional string session_id = 9; +} + +message SS_MS_ResponseTargetServer +{ + optional int32 error_code = 1; + optional string error_msg = 2; + optional int64 context_id = 3; + optional string host = 4; + optional int32 port = 5; +} + +message SS_SMRpcError +{ + optional int32 error_code = 1; + optional string error_msg = 2; + optional string debug_msg = 3; + optional string file = 4; + optional int32 lineno = 5; +} + +message SS_Ping +{ +} + +message SS_Pong +{ + optional int32 param1 = 1; +} + +message SS_ForceCloseSocket +{ +}