Skip to content

Instantly share code, notes, and snippets.

@beerose
Created August 28, 2018 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beerose/a9f0af03da5a3432864b2a2a86333f47 to your computer and use it in GitHub Desktop.
Save beerose/a9f0af03da5a3432864b2a2a86333f47 to your computer and use it in GitHub Desktop.
syntax = "proto3";
package chatty;
service ChatService {
rpc SendMessage (SendMessageRequest) returns (SendMessageReply) {}
rpc FetchMessages (FetchMessagesRequest) returns (FetchMessagesReply) {}
}
message SendMessageRequest {
ChatMessage chat_message = 1;
}
message SendMessageReply {}
message FetchMessagesRequest {}
message FetchMessagesReply {
repeated ChatMessage messages = 1;
}
message ChatMessage {
string sender = 1;
string text = 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment