mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
44 lines
992 B
Protocol Buffer
44 lines
992 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
import public "proto_cs_common.proto";
|
|
import public "proto_cs_player.proto";
|
|
|
|
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
|
|
{
|
|
CSHeatBeatReq HeatBeatReq = 1; //心跳请求
|
|
CSHeatBeatRes HeatBeatRes = 2; //心跳回包
|
|
CSActLoginReq ActLoginReq = 3; //帐号登录请求
|
|
CSActLoginRes ActLoginRes = 4; //帐号登录回包
|
|
}
|
|
|
|
// 协议ID
|
|
enum CSMsgID
|
|
{
|
|
CS_START = 0;
|
|
CS_CMD_HEATBEAT_REQ = 1001; //心跳请求
|
|
CS_CMD_HEATBEAT_RES = 1002; //心跳回包
|
|
CS_CMD_ACT_LOGIN_REQ = 2001; //帐号登录请求
|
|
CS_CMD_ACT_LOGIN_RES = 2002; //帐号登录回包
|
|
}
|