aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/client
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-09-30 10:47:24 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-09-30 10:47:24 -0700
commit4944ee23df42e46cf3de64c24c3f8df092841eb2 (patch)
tree5fe2148eb7f520a2ffc63a18ad09909704b198a4 /src/cpp/client
parenta40d4711104708152c56c1246a41eb9160e18df2 (diff)
parentbe43240564891aaa34bbd911332994fe8d197c0b (diff)
Merge remote-tracking branch 'upstream/master' into fail_fast
Diffstat (limited to 'src/cpp/client')
-rw-r--r--src/cpp/client/create_channel_posix.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cpp/client/create_channel_posix.cc b/src/cpp/client/create_channel_posix.cc
index 60cfed3d62..eb323ac50b 100644
--- a/src/cpp/client/create_channel_posix.cc
+++ b/src/cpp/client/create_channel_posix.cc
@@ -51,6 +51,16 @@ std::shared_ptr<Channel> CreateInsecureChannelFromFd(const grpc::string& target,
"", grpc_insecure_channel_create_from_fd(target.c_str(), fd, nullptr));
}
+std::shared_ptr<Channel> CreateCustomInsecureChannelFromFd(
+ const grpc::string& target, int fd, const ChannelArguments& args) {
+ internal::GrpcLibrary init_lib;
+ init_lib.init();
+ grpc_channel_args channel_args;
+ args.SetChannelArgs(&channel_args);
+ return CreateChannelInternal("", grpc_insecure_channel_create_from_fd(
+ target.c_str(), fd, &channel_args));
+}
+
#endif // GPR_SUPPORT_CHANNELS_FROM_FD
} // namespace grpc