wenz
wenz

Reputation: 169

How to use protobuf interface in C#

I write a .proto file, and it include a service:

service ServerService {
    rpc HelloServer (Word) returns (Void);
}

Then, I use protobuf-net generate .cs file:

public interface IServerService
{
  gt.Void HelloServer(gt.example.Word request);

}

But I do not know how to use it. Is there any doc?

Upvotes: 1

Views: 980

Answers (1)

farlee2121
farlee2121

Reputation: 3367

A new standard, gRPC, is picking up steam and has support in .net core.

Check out this tutorial: https://learn.microsoft.com/en-us/aspnet/core/tutorials/grpc/grpc-start?view=aspnetcore-3.1&tabs=visual-studio

The tutorial also links out to other information on gRPC in .NET. The docs are pretty good.

Upvotes: 1

Related Questions