Making unary calls on gRPC
In this section, we will learn how to make the most basic gRPC call—a unary call. Even though we have used this call type in previous chapters, we will look into it in more detail here. You will learn the difference between blocking and non-blocking unary call implementations on .NET, as well as how to work with its metadata.
We will also provide examples of unary calls that cover other fundamental aspects of gRPC and its .NET implementation. For example, you will learn how the URI path to RPCs gets constructed based on whether or not you use the package
keyword inside a Protobuf definition. You will also learn how to extract metadata from the requests and responses, both on the client and the server.
But first, we will set up our solution.
Setting up shared gRPC dependencies
We will place all of our projects into the same solution with shared dependencies. Let's get started:
- To create the solution, create the
GrpcCallTypes...