You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

49 lines
840 B

syntax = "proto3";
package game;
// Interface exported by the server.
service Connection {
rpc connect(Username) returns(UserID);
rpc joinLobbyWithCode(LobbyCode) returns(Null);
rpc joinLobbyWithoutCode(Null) returns(LobbyCode);
}
service Lobby {
rpc getGames(Null) returns(stream Game);
rpc vote(Vote) returns(Null);
rpc ready (Null) returns (Null);
rpc status (Null) returns (LobbyStatus);
}
message UserID {
string id = 1;
}
message Username {
string name = 1;
}
message Null {}
message LobbyCode { uint32 code = 1; }
message Game {
string name = 1;
string version = 2;
repeated string authors = 3;
uint64 id = 4;
}
message Vote { uint64 id = 1; }
message LobbyStatus {
repeated Vote votes = 1;
repeated Player ready = 2;
bool isStarting = 3;
}
message Player {
string name = 1;
uint64 id = 2;
}