syntax = "proto3";
package protos;

import "userinfo.proto";
import "result.proto";

message SYN {
}

message CloseNotify {
}

message closePush {
    int32 reason = 1; // 关闭原因
}

message HeartbeatRequest {
    uint32 Ping = 1; // ping值, 单位毫秒
}

message HeartbeatResponse {
    Result Result = 1;
}

message LoginRequest {
    UserInfo UserInfo = 1;
    double lng = 2; // 精度, 未授权或者未取到传0
    double lat = 3; // 纬度,未授权或者未取到传0
    uint32 RoomID = 4; // 接受邀请时传入邀请人的房间id
}

message LoginResponse {
    Result Result = 1;
    uint32 LobbyID = 2;
    uint32 RoomID = 3;
    uint32 SyncInterval=4;
    uint32 N=5;
    string Errmsg=6;
    uint64 T = 7;
    bool Master = 8;
    uint32 WorldID = 9;
    uint64 ServerID = 10;
}

message UpdateUserinfoRequest {
    UserInfo UserInfo = 1;
}
message UpdateUserinfoResponse {
    Result Result = 1;
}
message UpdateUserinfoPush {
    UserInfo UserInfo = 1;
}