Skip to content

Instantly share code, notes, and snippets.

@Arunshaik2001
Last active December 25, 2022 16:46
Show Gist options
  • Save Arunshaik2001/db2e314dc83ef75ed62002bca36f387b to your computer and use it in GitHub Desktop.
Save Arunshaik2001/db2e314dc83ef75ed62002bca36f387b to your computer and use it in GitHub Desktop.
syntax = "proto3";
option java_multiple_files = true;
option java_package = "com.example.grpc_app_demo";
option java_outer_classname = "GreeterProto";
option objc_class_prefix = "GRT";
package greeter;
// The greeting service definition.
service Greeter {
//unary call
rpc SayHello (HelloRequest) returns (HelloResponse) {}
//server_streaming
rpc LotsOfReplies(HelloRequest) returns (stream HelloResponse);
//client_streaming
rpc LotsOfRequests(stream HelloRequest) returns (HelloResponse);
//bi-directional_streaming
rpc BidirectionalHello(stream HelloRequest) returns (stream HelloResponse);
}
// The request message containing the user's name.
message HelloRequest {
string name = 1;
}
// The response message containing the greetings
message HelloResponse {
string message = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment