|
|
|
@ -28,14 +28,14 @@ namespace grpc_impl { |
|
|
|
|
|
|
|
|
|
#ifdef GPR_SUPPORT_CHANNELS_FROM_FD |
|
|
|
|
|
|
|
|
|
std::shared_ptr<grpc::Channel> CreateInsecureChannelFromFd(const grpc::string& target, |
|
|
|
|
int fd) { |
|
|
|
|
std::shared_ptr<grpc::Channel> CreateInsecureChannelFromFd( |
|
|
|
|
const grpc::string& target, int fd) { |
|
|
|
|
grpc::internal::GrpcLibrary init_lib; |
|
|
|
|
init_lib.init(); |
|
|
|
|
return grpc::CreateChannelInternal( |
|
|
|
|
"", grpc_insecure_channel_create_from_fd(target.c_str(), fd, nullptr), |
|
|
|
|
std::vector< |
|
|
|
|
std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>()); |
|
|
|
|
std::vector<std::unique_ptr< |
|
|
|
|
grpc::experimental::ClientInterceptorFactoryInterface>>()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
std::shared_ptr<grpc::Channel> CreateCustomInsecureChannelFromFd( |
|
|
|
@ -47,13 +47,14 @@ std::shared_ptr<grpc::Channel> CreateCustomInsecureChannelFromFd( |
|
|
|
|
return grpc::CreateChannelInternal( |
|
|
|
|
"", |
|
|
|
|
grpc_insecure_channel_create_from_fd(target.c_str(), fd, &channel_args), |
|
|
|
|
std::vector< |
|
|
|
|
std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>()); |
|
|
|
|
std::vector<std::unique_ptr< |
|
|
|
|
grpc::experimental::ClientInterceptorFactoryInterface>>()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
namespace experimental { |
|
|
|
|
|
|
|
|
|
std::shared_ptr<grpc::Channel> CreateCustomInsecureChannelWithInterceptorsFromFd( |
|
|
|
|
std::shared_ptr<grpc::Channel> |
|
|
|
|
CreateCustomInsecureChannelWithInterceptorsFromFd( |
|
|
|
|
const grpc::string& target, int fd, const grpc::ChannelArguments& args, |
|
|
|
|
std::vector< |
|
|
|
|
std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>> |
|
|
|
|