mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] proto
This commit is contained in:
45
Luban/Proto/pb_schemas/proto_cs.proto
Normal file
45
Luban/Proto/pb_schemas/proto_cs.proto
Normal file
@@ -0,0 +1,45 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package GameProto;
|
||||
// 这个文件只放协议,和协议头
|
||||
|
||||
// 消息协议
|
||||
message CSPkg
|
||||
{
|
||||
CSPkgHead Head = 1; //消息协议头
|
||||
CSPkgBody Body = 2; //消息协议体
|
||||
}
|
||||
|
||||
// 消息协议头
|
||||
message CSPkgHead
|
||||
{
|
||||
uint32 MsgId = 1; //协议号
|
||||
uint32 MsgLength = 2; //协议长度
|
||||
uint32 MsgVersion = 3; //协议版本
|
||||
uint32 Echo = 4; //回带字段
|
||||
uint32 SvrTime = 5; //服务器时间
|
||||
}
|
||||
|
||||
// 消息协议体
|
||||
message CSPkgBody
|
||||
{
|
||||
CSActLoginReq ActLoginReq = 1; //帐号登录请求
|
||||
CSActLoginRes ActLoginRes = 2; //帐号登录回包
|
||||
}
|
||||
|
||||
// 消息结果
|
||||
message ProtoResult
|
||||
{
|
||||
int32 Ret =1; //操作结果,0 为成功, 其他为错误码
|
||||
int32 ParamCnt =2; //文本参数数目
|
||||
repeated string Params = 3;//Ret描述的文本参数
|
||||
}
|
||||
|
||||
|
||||
// 协议ID
|
||||
enum CSMsgID
|
||||
{
|
||||
CS_START = 0;
|
||||
CS_HeartBeat = 10001;
|
||||
CS_END = 10000;
|
||||
}
|
Reference in New Issue
Block a user