diff options
author | yangg <yangg@google.com> | 2014-12-19 14:00:14 -0800 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2014-12-29 16:59:06 -0800 |
commit | 59dfc90f578baedce8bbf8bb07e3e1a24ec1fb68 (patch) | |
tree | 61197977561961ce2b7e395c0aa6bb9d7163f74c /src/cpp/client/channel.h | |
parent | c463f746c90240d5b724c546660e90853ebed77d (diff) |
Client side implementation of creating channel with credentials.
The old test_ssl_channel related code is deleted and the new create channel
call is used for interop tests.
Change on 2014/12/19 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82540921
Diffstat (limited to 'src/cpp/client/channel.h')
-rw-r--r-- | src/cpp/client/channel.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/cpp/client/channel.h b/src/cpp/client/channel.h index a97d35efe8..621e58539b 100644 --- a/src/cpp/client/channel.h +++ b/src/cpp/client/channel.h @@ -34,17 +34,24 @@ #ifndef __GRPCPP_INTERNAL_CLIENT_CHANNEL_H__ #define __GRPCPP_INTERNAL_CLIENT_CHANNEL_H__ +#include <memory> + #include <grpc++/channel_interface.h> #include <grpc++/config.h> struct grpc_channel; namespace grpc { +class ChannelArguments; +class Credentials; class StreamContextInterface; class Channel : public ChannelInterface { public: - explicit Channel(const grpc::string& target); + Channel(const grpc::string& target, const ChannelArguments& args); + Channel(const grpc::string& target, const std::unique_ptr<Credentials>& creds, + const ChannelArguments& args); + ~Channel() override; Status StartBlockingRpc(const RpcMethod& method, ClientContext* context, @@ -56,11 +63,6 @@ class Channel : public ChannelInterface { const google::protobuf::Message* request, google::protobuf::Message* result) override; - protected: - // TODO(yangg) remove this section when we have the general ssl channel API - Channel() {} - void set_c_channel(grpc_channel* channel) { c_channel_ = channel; } - private: const grpc::string target_; grpc_channel* c_channel_; // owned |