aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2015-02-13 16:25:33 -0800
committerGravatar Yang Gao <yangg@google.com>2015-02-13 16:25:33 -0800
commit406b32f663d14994a24abea3788d0bffce216f8a (patch)
treef0a6fb5dabbfc589cc79f25a0038e99ea5c2d283 /src/cpp
parent0e0d8e11e63629a3953ceed60278f7ff2abd21d7 (diff)
Add missing APIs and a first metadata test, and test passes
Diffstat (limited to 'src/cpp')
-rw-r--r--src/cpp/client/client_context.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc
index afacc81c16..64a829630d 100644
--- a/src/cpp/client/client_context.cc
+++ b/src/cpp/client/client_context.cc
@@ -75,6 +75,10 @@ void ClientContext::AddMetadata(const grpc::string &meta_key,
send_initial_metadata_.insert(std::make_pair(meta_key, meta_value));
}
-void ClientContext::StartCancel() {}
+void ClientContext::TryCancel() {
+ if (call_) {
+ grpc_call_cancel(call_);
+ }
+}
} // namespace grpc