Beispiel #1
0
        public static ClientProxy <TService> CreateClientProxy <TService>(string host, int port, string publicKey, string sslTargetName, bool isWrapFaultException = true, int timeoutInterval = 1200000, int hearbeatInterval = 10000)
        {
            var ssl     = new SslCredentials(publicKey);
            var options = new List <ChannelOption>();

            options.Add(new ChannelOption(ChannelOptions.SslTargetNameOverride, sslTargetName));
            Channel channel = new Channel(host, port, ssl, options);
            var     factory = new ClientConnectionFactory(channel);

            return(new GrpcClientProxy <TService>(factory, isWrapFaultException, timeoutInterval, hearbeatInterval));
        }
Beispiel #2
0
 public static ClientProxy <TService> CreateClientProxy <TService>(ClientConnectionFactory factory, bool isWrapFaultException = true, int timeoutInterval = 1200000, int hearbeatInterval = 10000)
 {
     return(new GrpcClientProxy <TService>(factory, isWrapFaultException, timeoutInterval, hearbeatInterval));
 }