grpcpp-bidi-streaming
grpcpp-bidi-streaming copied to clipboard
gRPC C++ bidirectional streaming example
grpcpp-bidi-streaming
This is a gRPC C++ bidirectional streaming example: a simple file server.
Features
- two-way asynchronous communication
- block data transfer
- multiple processing threads (the number of threads is currently hard-coded)
- safe memory management
- managed file locking
- pending request cancellation
Protocol
See schema
Requirements
- A C++ compiler with C++14 support
- Protobuf
- gRPC (needs to be built from source)
How to build
At the moment only cmake
is supported.
Typical out-of-source build command sequence:
mkdir build
cd build
cmake ..
make
How to run
Server app:
./FileExchangeServer [<file> ...]
Files provided on the command line are managed by the server i.e. are available for download.
Client app:
./FileExchangeClient download|upload <file>