syntax = "proto3"; import "google/protobuf/empty.proto"; import "common.proto"; package connection; // Connection utilities to get a client_id // service Connection { // rpc name(google.protobuf.Empty) returns(common.Name); // rpc connect(common.Name) returns(UserID); // rpc joinLobbyWithCode(LobbyCode) returns(google.protobuf.Empty); // rpc createLobby(LobbyConfig) returns(LobbyCode); // rpc getGames(google.protobuf.Empty) returns(stream Game); // rpc getPublicLobbies (google.protobuf.Empty) returns (stream LobbyCode); // rpc disconnect (google.protobuf.Empty) returns (google.protobuf.Empty); // } message Game { string name = 1; string version = 2; repeated string authors = 3; uint32 id = 4; } message UserID { string id = 1; } message LobbyConfig { bool public = 1; // repeated uint32 allowed_games = 2; } message LobbyCode { uint32 code = 1; }