示例#1
0
        // 客户端流式处理调用
        private static async Task Run3Async(Greeter.GreeterClient client)
        {
            using var call = client.ClientStream();
            for (var i = 0; i < 3; i++)
            {
                await call.RequestStream.WriteAsync(new() { Name = $"sinx{i}" });
            }
            await call.RequestStream.CompleteAsync();

            var res = await call;

            Console.WriteLine(res.Message);
        }