Scalar Data Types in Protobuf
Learn about the inbuilt data types available in Protobuf and how these get translated to the C# data type.
We'll cover the following...
In this lesson, we'll have a look at built-in data types available in Protobuf. We'll also learn how these get translated to the C# data type. We'll see how these basic data types work by adding them to the setup we've built previously. The code widget below contains the full setup that we have built up to this point, containing both the gRPC client and server applications.
syntax = "proto3";
option csharp_namespace = "BasicGrpcService";
package basic_grpc_service;
service Chatbot {
rpc SendMessage (ChatRequest) returns (ChatReply);
}
message ChatRequest {
string name = 1;
string message = 2;
}
message ChatReply {
string message = 1;
}
The full setup, including gRPC server and gRPC client
The inbuilt data types are also known as scalar value types. These are the primitive data types that are available in Protobuf without using any external libraries. Previously, we used string ...
Ask