diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-04-27 18:23:42 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-04-27 18:23:42 -0700 |
commit | 320e6112b5831904c89364a193b52f70f8da4837 (patch) | |
tree | 2e7b45817b678410781bda30e91c77b15c612c68 /include/grpc++/client_context.h | |
parent | ea9fbb15b861f71c6fa0c7d78f786c74ce1698fb (diff) | |
parent | 17cc30c0b589fd265bede8ba66a0f564166244aa (diff) |
Merge branch 'one-pass' of github.com:ctiller/grpc into one-pass
Diffstat (limited to 'include/grpc++/client_context.h')
-rw-r--r-- | include/grpc++/client_context.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h index 19630c9b54..a58e9872e6 100644 --- a/include/grpc++/client_context.h +++ b/include/grpc++/client_context.h @@ -35,6 +35,7 @@ #define GRPCXX_CLIENT_CONTEXT_H #include <map> +#include <memory> #include <string> #include <grpc/support/log.h> @@ -126,9 +127,10 @@ class ClientContext { friend class ::grpc::ClientAsyncResponseReader; grpc_call* call() { return call_; } - void set_call(grpc_call* call) { + void set_call(grpc_call* call, const std::shared_ptr<ChannelInterface>& channel) { GPR_ASSERT(call_ == nullptr); call_ = call; + channel_ = channel; } grpc_completion_queue* cq() { return cq_; } @@ -137,6 +139,7 @@ class ClientContext { grpc::string authority() { return authority_; } bool initial_metadata_received_; + std::shared_ptr<ChannelInterface> channel_; grpc_call* call_; grpc_completion_queue* cq_; gpr_timespec deadline_; |