grpc/examples/cpp
Christopher Warrington 4be4df3624 Bump min CMake to 3.5.1 to match Google benchmark
The Google Benchmark CMake build needs CMake 3.5.1 or newer. CMake 3.5.1
was released May 24, 2016 and is available in Debian stable and Ubuntu
16.04 and 18.04.
2019-07-02 23:02:47 +00:00
..
compression Add compression example 2018-12-12 15:06:12 -08:00
helloworld Bump min CMake to 3.5.1 to match Google benchmark 2019-07-02 23:02:47 +00:00
keyvaluestore Reviewer comments 2019-01-17 12:03:14 -08:00
load_balancing Add LB example 2018-12-19 10:40:13 -08:00
metadata Revert "Revert "Metadata tutorial"" 2018-12-17 12:09:11 -08:00
route_guide Link against pthread in examples 2019-06-11 12:12:33 -07:00
README.md overhaul of top-level .md files 2018-06-20 20:35:04 +02:00
cpptutorial.md overhaul of top-level .md files 2018-06-20 20:35:04 +02:00

README.md

gRPC in 3 minutes (C++)

Installation

To install gRPC on your system, follow the instructions to build from source here. This also installs the protocol buffer compiler protoc (if you don't have it already), and the C++ gRPC plugin for protoc.

Hello C++ gRPC!

Here's how to build and run the C++ implementation of the Hello World example used in Getting started.

Client and server implementations

The client implementation is at greeter_client.cc.

The server implementation is at greeter_server.cc.

Try it!

Build client and server:

$ make

Run the server, which will listen on port 50051:

$ ./greeter_server

Run the client (in a different terminal):

$ ./greeter_client

If things go smoothly, you will see the "Greeter received: Hello world" in the client side output.

Tutorial

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