aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/impl
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2015-08-20 10:59:29 -0700
committerGravatar yang-g <yangg@google.com>2015-08-20 10:59:29 -0700
commit431f8c2b5feecf202c484f6d0d1d7a0cf6f4be73 (patch)
tree440c1c9b18b776d79739e8c3620df6be6e3d42ad /include/grpc++/impl
parent8c2be9f22807870585111d88f5168dd11da99ce1 (diff)
make registermethod private
Diffstat (limited to 'include/grpc++/impl')
-rw-r--r--include/grpc++/impl/rpc_method.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/grpc++/impl/rpc_method.h b/include/grpc++/impl/rpc_method.h
index 50a160b08c..912ffab21f 100644
--- a/include/grpc++/impl/rpc_method.h
+++ b/include/grpc++/impl/rpc_method.h
@@ -34,6 +34,10 @@
#ifndef GRPCXX_IMPL_RPC_METHOD_H
#define GRPCXX_IMPL_RPC_METHOD_H
+#include <memory>
+
+#include <grpc++/channel.h>
+
namespace grpc {
class RpcMethod {
@@ -45,8 +49,11 @@ class RpcMethod {
BIDI_STREAMING
};
- RpcMethod(const char* name, RpcType type, void* channel_tag)
- : name_(name), method_type_(type), channel_tag_(channel_tag) {}
+ RpcMethod(const char* name, RpcType type,
+ const std::shared_ptr<Channel>& channel)
+ : name_(name),
+ method_type_(type),
+ channel_tag_(channel->RegisterMethod(name)) {}
const char* name() const { return name_; }
RpcType method_type() const { return method_type_; }