The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
https://grpc.io/
|
1 year ago | |
---|---|---|
.. | ||
BUILD | 1 year ago | |
CMakeLists.txt | 1 year ago | |
README.md | 1 year ago | |
greeter_callback_client.cc | 1 year ago |
README.md
gRPC C++ Wait-For-Ready Example
The Wait-For-Ready example builds on the Hello World Example and changes the gRPC client and server to show how to set wait-for-ready.
For more information on wait-for-ready in gRPC, please refer to gRPC Wait For Ready Semantics.
Running the example
First run the client -
$ tools/bazel run examples/cpp/wait_for_ready:greeter_callback_client
On running this, we'll see 10 RPCs failed due to "Connection refused" errors. These RPCs did not have WAIT_FOR_READY set, resulting in the RPCs not waiting for the channel to be connected.
The next 10 RPCs have WAIT_FOR_READY set, so the client will be waiting for the channel to be ready before progressing.
Now, on a separate terminal, run the server -
$ tools/bazel run examples/cpp/helloworld:greeter_callback_server
The client channel should now be able to connect to the server, and the RPCs should succeed.