• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Use in C++    {#flatbuffers_grpc_guide_use_cpp}
2==========
3
4## Before you get started
5
6Before diving into the FlatBuffers gRPC usage in C++, you should already be
7familiar with the following:
8
9- FlatBuffers as a serialization format
10- [gRPC](http://www.grpc.io/docs/) usage
11
12## Using the FlatBuffers gRPC C++ library
13
14NOTE: The examples below are also in the `grpc/samples/greeter` directory.
15
16We will illustrate usage with the following schema:
17
18@include grpc/samples/greeter/greeter.fbs
19
20When we run `flatc`, we pass in the `--grpc` option and generage an additional
21`greeter.grpc.fb.h` and `greeter.grpc.fb.cc`.
22
23Example server code looks like this:
24
25@include grpc/samples/greeter/server.cpp
26
27Example client code looks like this:
28
29@include grpc/samples/greeter/client.cpp
30