diff options
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_; |