syntax = "proto3"; package chat; import "google/protobuf/empty.proto"; message ChatMessage { string from = 1; string msg = 2; string time = 3; } message UserList {} message User { } message JoinResponse { } service ChatService { rpc join(User) returns (JoinResponse) {} rpc sendMsg(ChatMessage) returns (google.protobuf.Empty) {} rpc receiveMsg(google.protobuf.Empty) returns (stream ChatMessage) {} 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; } // The response message containing the greetings message HelloReply { string message = 1; }