Use channel tags to call methods

pull/1261/head
Craig Tiller 10 years ago committed by Craig Tiller
parent 3beef68d39
commit 15f9f95312
  1. 7
      src/cpp/client/channel.cc

@ -61,7 +61,12 @@ Channel::~Channel() { grpc_channel_destroy(c_channel_); }
Call Channel::CreateCall(const RpcMethod& method, ClientContext* context,
CompletionQueue* cq) {
auto c_call = grpc_channel_create_call(c_channel_, cq->cq(), method.name(),
auto c_call = method.channel_tag()?
grpc_channel_create_registered_call(
c_channel_, cq->cq(),
method.channel_tag(), context->RawDeadline()) :
grpc_channel_create_call(c_channel_, cq->cq(), method.name(),
context->authority().empty()
? target_.c_str()
: context->authority().c_str(),

Loading…
Cancel
Save