aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2019-01-10 13:25:57 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2019-01-10 13:25:57 -0800
commitc01e866a88beee6143f19fa243b85d5792c36cae (patch)
treeba5bdbfdce2a50cdca6b0f14fe5fccb556c42ce8
parentf1e9306c702ee83f4808597212824301d3a909a5 (diff)
better documentation
-rw-r--r--examples/cpp/keyvaluestore/client.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/cpp/keyvaluestore/client.cc b/examples/cpp/keyvaluestore/client.cc
index 9f5fa37cb1..cdf353fafd 100644
--- a/examples/cpp/keyvaluestore/client.cc
+++ b/examples/cpp/keyvaluestore/client.cc
@@ -41,19 +41,19 @@ class KeyValueStoreClient {
KeyValueStoreClient(std::shared_ptr<Channel> channel)
: stub_(KeyValueStore::NewStub(channel)) {}
- // Assembles the client's payload, sends it and presents the response back
- // from the server.
+ // Requests each key in the vector and displays the value as a pair
void GetValues(const std::vector<std::string>& keys) {
// Context for the client. It could be used to convey extra information to
// the server and/or tweak certain RPC behaviors.
ClientContext context;
auto stream = stub_->GetValues(&context);
for (const auto& key:keys) {
- // Data we are sending to the server.
+ // Key we are sending to the server.
Request request;
request.set_key(key);
stream->Write(request);
+ // Get the value for the sent key
Response response;
stream->Read(&response);
std::cout << key << " : " << response.value() << "\n";