46 lines
1.3 KiB
Protocol Buffer
46 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
package baseproto;
|
|
|
|
enum ENUM_MAIN_ID {
|
|
UNUSED = 0;//无效
|
|
TOKEN_ID = 1;//
|
|
LOGIN_ID = 2;//登录
|
|
HALL_ID = 3;//大厅
|
|
GAME_ID = 4;//大厅
|
|
}
|
|
|
|
enum ENUM_ERRO_ID{
|
|
PACKAGE_ERRO = -1; //包体错误
|
|
MAIN_SUB_ERRO = -2; //消息号错误
|
|
BODY_ERRO = -3; //消息体错误
|
|
DB_ERRO = -4; //数据库错误
|
|
}
|
|
|
|
message Msg_Head
|
|
{
|
|
|
|
uint32 wMainCmdID = 1; //主命令码
|
|
uint32 wSubCmdID = 2; //子命令码
|
|
bytes msgBody = 3;
|
|
}
|
|
|
|
message Msg_TokenBody
|
|
{
|
|
string strToken = 1; //token
|
|
bytes msgBody = 2; //消息体
|
|
}
|
|
//消息
|
|
message Msg_Info
|
|
{
|
|
uint32 cbDataKind = 1; //数据类型
|
|
uint32 wPacketSize = 2; //数据大小
|
|
bytes msgBuff = 3; //可变消息体
|
|
}
|
|
|
|
|
|
message MsgBodyErro //mainId :0 subId:0
|
|
{
|
|
uint32 code = 1;//错误码
|
|
string disp = 2;//错误描述
|
|
}
|