syntax = "proto3";
package pbfmsg;

option go_package = "./;pbfmsg";

message RouteMsg{
    int64 playerId = 1;    
    string msgName = 2;   
    int64 rpcId = 3;
    bytes data = 4;
    int64 gateId = 5;
    int64 loginTs = 6;
}

message ResponseRouteMsg{
    int64 playerId = 1;
    bytes data = 2;
    bytes param = 3;
}

message ServerLogin{
    int64 ID = 1;
    string type = 2;
    string gateAddr = 3;
    repeated int32 lines = 4;
}

message ResponseServerLogin{
    int64 ID = 1;
    string type = 2;
    string gateAddr = 3;
    repeated int32 lines = 4;
}

message NewClientToken{
    int64 ID = 1;
    string token = 2;
    string openId = 3;
}

//ID：发送者ID；state 1:让对方退出; 2:自己准备关闭
message ChangeState{
    int32 ID = 1;
    int32 state = 2;
}

//errCode 0:已完成
message ResponseChangeState{
    int32 errCode = 1;
    int32 state = 2;
}

//type 0:查询特定终端在线情况 1：查询所有在线终端
message QueryPlayer{
    int32 type = 1;
    repeated int64 allUser = 2;
}

message ResponseQueryPlayer{
    int32 type = 1;
    repeated int64 onlines = 2;
    repeated int64 offlines = 3;
}

message Heart{
    int64 tick = 1;
}

message ResponseHeart{
    int64 tick = 1;
}
