Jan Tattermusch b836d03921 regenerate protobuf code and grpc stubs il y a 9 ans
..
.nuget aa576ee179 update nuget packages il y a 9 ans
Greeter b836d03921 regenerate protobuf code and grpc stubs il y a 9 ans
GreeterClient aa576ee179 update nuget packages il y a 9 ans
GreeterServer aa576ee179 update nuget packages il y a 9 ans
Greeter.sln 8a937d6ed4 update helloworld example to proto3 il y a 10 ans
README.md 3fcbdef6f7 further docs fixes il y a 10 ans
generate_protos.bat ded21891f0 update regenerate scripts il y a 9 ans

README.md

gRPC in 3 minutes (C#)

BACKGROUND

For this sample, we've already generated the server and client stubs from helloworld.proto.

Example projects depend on the Grpc and Google.Protobuf NuGet packages which have been already added to the project for you.

PREREQUISITES

Windows

  • .NET 4.5+
  • Visual Studio 2013 or 2015

Linux

  • Mono
  • Monodevelop 5.9 with NuGet Add-in installed

Mac OS X

  • Xamarin Studio (with NuGet plugin installed)
  • homebrew

BUILD

Windows

  • Open solution Greeter.sln with Visual Studio

  • Build the solution (this will automatically download NuGet dependencies)

Linux (Debian)

  • Install gRPC C core and C# native extension using How to use gRPC C# instructions

  • Open solution Greeter.sln in MonoDevelop.

  • Build the solution (you need to manually restore dependencies by using mono nuget.exe restore if you don't have NuGet add-in)

Mac OS X

  • Install gRPC C core and C# native extension using How to use gRPC C# instructions

  • Open solution Greeter.sln with Xamarin Studio

  • Build the solution (this will automatically download NuGet dependencies)

Try it!

  • Run the server

    > cd GreeterServer/bin/Debug
    > GreeterServer.exe
    
  • Run the client

    > cd GreeterClient/bin/Debug
    > GreeterClient.exe
    

You can also run the server and client directly from Visual Studio.

On Linux or Mac, use mono GreeterServer.exe and mono GreeterClient.exe to run the server and client.

Tutorial

You can find a more detailed tutorial in gRPC Basics: C#