29 lines
617 B
Protocol Buffer
29 lines
617 B
Protocol Buffer
syntax = "proto3";
|
||
package ipb;
|
||
option go_package = "common/proto/ipb";
|
||
|
||
enum MsgId
|
||
{
|
||
Unknown = 0;
|
||
Internal = -1; // 内部消息id
|
||
}
|
||
|
||
|
||
message InternalMsg
|
||
{
|
||
uint32 conn_id = 1; // 刚登陆时没有user_id,只有conn_id
|
||
int64 user_id = 2; // 玩家id
|
||
int32 msg_id = 3; // 消息id
|
||
bytes msg = 4; // 消息
|
||
}
|
||
|
||
// 网关解包客户端消息
|
||
message C2SMessage
|
||
{
|
||
int32 service_type = 1; // 服务类型,通过该值判断发往lobby,game,chat等内部服务
|
||
int32 msg_id = 2; // 消息id
|
||
int64 user_id = 3; // 玩家id
|
||
bytes msg = 4; // 消息
|
||
}
|
||
|