The RPC types supported by gRPC
We will start by creating a solution from a standard gRPC Service
template. We will call our project IndepthProtobuf
. To create this project, execute the following command:
dotnet new grpc -o IndepthProtobuf
Now, we are ready to make modifications to our project to examine all the relevant Protobuf features.
The RPC types that Protobuf supports
Since we already have the greet.proto
file placed in the Protos
directory of our IndepthProtobuf
project, and because we already have a basic implementation of the service represented by this file, we won't be replacing any existing functionality. Instead, we will add to it.
To make a start, we will replace the content of the greet.proto
file with the following:
syntax = "proto3"; option csharp_namespace = "IndepthProtobuf"; package greet; service Greeter { rpc SayHello (HelloRequest) returns (HelloReply); // Unary RPC ...