示例#1
0
文件: MainApp.cs 项目: sycomix/MLOS
        private static async Task Test()
        {
            // The port number(5001) must match the port of the gRPC server.
            //
            using GrpcChannel channel = GrpcChannel.ForAddress("http://localhost:5000");
            var       client = new Greeter.GreeterClient(channel);
            EchoReply reply  = await client.EchoAsync(
                new EchoRequest
            {
                Name = "GreeterClient",
            });

            Console.WriteLine("Greeting: " + reply.Message);
            Console.WriteLine("Press any key to exit...");
        }