miduo_protocol/protos/RoomProto.proto

43 lines
1.3 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.ljsd.jieling.protocols;
option optimize_for = SPEED;
import "CommonProto.proto";
//因为多个人在一个房间中战斗,需要实现实时的处理方案
//匹配进入的房间
message RoomMatchRequest{
optional int32 type = 1; //type 匹配游戏类型 1血战
}
//匹配应答
message RoomMatchResponse{
optional bool result = 1; //true 请求匹配成功false 请求匹配失败
optional int32 type = 2; //type 匹配游戏类型 1血战
}
//取消匹配,必须等待服务器应答成功后,客户端才能退出匹配界面,
//否则可能服务器端可能匹配成功,客户端退出了匹配模式
message RoomCancelMatchRequest{
optional int32 type = 1; //type 匹配游戏类型 1血战
}
message RoomCancelMatchResponse{
optional bool result = 1; //true 取消成功false 不能取消
optional int32 type = 2; //type 匹配游戏类型 1血战
}
//必须有准备过程防止因为机器性能原因导致,性能好的先进入游戏
message RoomStartGameReadyRequest{
optional int32 type = 1; //type 匹配游戏类型 1血战
}
//匹配应答
message RoomStartGameReadyResponse{
optional int32 type = 1; //type 匹配游戏类型 1血战
}
message RoomStartGameIndication{
optional int32 roomId = 1;
optional int32 type = 2; //type 匹配游戏类型 1血战
}