diff options
author | 2015-04-17 08:03:20 +0900 | |
---|---|---|
committer | 2015-04-17 08:03:20 +0900 | |
commit | dca359cc5aedc45779828ad4aa7df196ca48d94a (patch) | |
tree | 21a18bd31791064717eb840f3993fc57b865c8f4 /src/cpp/client/channel.cc | |
parent | 29ee1dbc93d1b97578d39c796bfc19b99e57545f (diff) | |
parent | d35b7107f8c54196ba8ddd55a0760e5f559e2014 (diff) |
Merge branch 'master' into fix/typed-struct
Conflicts:
src/ruby/ext/grpc/rb_grpc.c
Diffstat (limited to 'src/cpp/client/channel.cc')
-rw-r--r-- | src/cpp/client/channel.cc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel.cc index 72123abbc8..478f223322 100644 --- a/src/cpp/client/channel.cc +++ b/src/cpp/client/channel.cc @@ -61,12 +61,17 @@ 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(), - context->authority().empty() - ? target_.c_str() - : context->authority().c_str(), - context->RawDeadline()); - GRPC_TIMER_MARK(CALL_CREATED,c_call); + 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(), + context->RawDeadline()); + GRPC_TIMER_MARK(CALL_CREATED, c_call); context->set_call(c_call); return Call(c_call, this, cq); } @@ -82,4 +87,8 @@ void Channel::PerformOpsOnCall(CallOpBuffer* buf, Call* call) { GRPC_TIMER_MARK(PERFORM_OPS_END, call->call()); } +void* Channel::RegisterMethod(const char* method) { + return grpc_channel_register_call(c_channel_, method, target_.c_str()); +} + } // namespace grpc |