channel creation API change
diff --git a/include/grpc++/create_channel.h b/include/grpc++/create_channel.h
index 0e559ac..916f3b0 100644
--- a/include/grpc++/create_channel.h
+++ b/include/grpc++/create_channel.h
@@ -44,6 +44,12 @@
// If creds does not hold an object or is invalid, a lame channel is returned.
std::shared_ptr<Channel> CreateChannel(
+ const grpc::string& target, const std::shared_ptr<Credentials>& creds);
+
+// For advanced use and testing ONLY. Override default channel arguments only
+// if necessary.
+// If creds does not hold an object or is invalid, a lame channel is returned.
+std::shared_ptr<Channel> CreateCustomChannel(
const grpc::string& target, const std::shared_ptr<Credentials>& creds,
const ChannelArguments& args);
diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc
index 8c571cb..8d2f1bf 100644
--- a/src/cpp/client/create_channel.cc
+++ b/src/cpp/client/create_channel.cc
@@ -43,7 +43,12 @@
namespace grpc {
class ChannelArguments;
-std::shared_ptr<Channel> CreateChannel(
+std::shared_ptr<Channel> CreateCustomChannel(
+ const grpc::string& target, const std::shared_ptr<Credentials>& creds) {
+ return CreateCustomChannel(target, creds, ChannelArguments());
+}
+
+std::shared_ptr<Channel> CreateCustomChannel(
const grpc::string& target, const std::shared_ptr<Credentials>& creds,
const ChannelArguments& args) {
ChannelArguments cp_args = args;
@@ -57,4 +62,5 @@
NULL, GRPC_STATUS_INVALID_ARGUMENT,
"Invalid credentials."));
}
+
} // namespace grpc