From c01e866a88beee6143f19fa243b85d5792c36cae Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Thu, 10 Jan 2019 13:25:57 -0800 Subject: better documentation --- examples/cpp/keyvaluestore/client.cc | 6 +++--- 1 file 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) : 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& 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"; -- cgit v1.2.3