Skip to content
Snippets Groups Projects
Commit 15f9f953 authored by Craig Tiller's avatar Craig Tiller Committed by Craig Tiller
Browse files

Use channel tags to call methods

parent 3beef68d
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,12 @@ Channel::~Channel() { grpc_channel_destroy(c_channel_); } ...@@ -61,7 +61,12 @@ Channel::~Channel() { grpc_channel_destroy(c_channel_); }
Call Channel::CreateCall(const RpcMethod& method, ClientContext* context, Call Channel::CreateCall(const RpcMethod& method, ClientContext* context,
CompletionQueue* cq) { 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() context->authority().empty()
? target_.c_str() ? target_.c_str()
: context->authority().c_str(), : context->authority().c_str(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment