Exemplo n.º 1
0
        static async Task Main(string[] args)
        {
            using (var channel = GrpcChannel.ForAddress("https://localhost:50000"))
            {
                var client = new SayHelloServiceClient(channel);
                var reply  = await client.SayHelloAsync(new HelloRequest()
                {
                    Name = "Name"
                });

                Console.WriteLine("Press any key to finish...");
                Console.ReadKey();
            }
        }
Exemplo n.º 2
0
        static async Task Main(string[] args)
        {
            var port = 50000;

            var channel = new Channel($"127.0.0.1:{port}", ChannelCredentials.Insecure);
            var client  = new SayHelloServiceClient(channel);

            var reply = await client.SayHelloAsync(new HelloRequest()
            {
                Name = "Name"
            });

            Console.WriteLine("Press any key to finish...");
            Console.ReadKey();
        }