Files
hp-lite/proto/HpMessage.proto
黑小马 06bfdc6f74 6.0
2025-11-10 14:36:43 +08:00

40 lines
633 B
Protocol Buffer

//定义版本
syntax = "proto3";
package net.hserver.hp.common.protocol;
option java_outer_classname="HpMessageData";
option go_package = "./HpMessage";
message HpMessage{
//枚举消息类型
enum HpMessageType
{
REGISTER=0;
REGISTER_RESULT=1;
CONNECTED=2;
DISCONNECTED=3;
DATA=4;
KEEPALIVE=5;
}
//元数据
message MetaData{
string key=1;
string protocol=2;
string channelType=3;
string channelId=4;
bool success=5;
string reason=6;
}
//消息类型
HpMessageType type = 1;
//元数据
MetaData metaData = 2;
//穿透真实数据流
bytes data=3;
}