syntax = "proto3"; package chat; import "google/protobuf/empty.proto"; message ChatMessage { string from = 1; string msg = 2; string time = 3; } message Channel {} message UserList { repeated User user = 1; } message RoomList {} message User { string username = 1; } message JoinResponse {} service Chat { rpc join(User) returns (JoinResponse) {} rpc sendMsg(ChatMessage) returns (google.protobuf.Empty) {} rpc receiveMsg(google.protobuf.Empty) returns (stream ChatMessage) {} rpc listRooms(google.protobuf.Empty) returns (RoomList) {} rpc getAllUsers(google.protobuf.Empty) returns (UserList) {} } // Hello world shit // The greeting service definition. service Greeter { // Sends a greeting rpc SayHello(HelloRequest) returns (HelloReply) {} } // The request message containing the user's name. message HelloRequest { string name = 1; string message = 2; } // The response message containing the greetings message HelloReply { string message = 1; }