RunServerStreamingAsync() public static method

public static RunServerStreamingAsync ( Grpc.Testing.TestService client ) : Task
client Grpc.Testing.TestService
return Task
Example #1
0
        async Task RunTestCaseAsync(TestService.TestServiceClient client, string testCase)
        {
            switch (testCase)
            {
            case "empty_unary":
                InteropClient.RunEmptyUnary(client);
                break;

            case "large_unary":
                InteropClient.RunLargeUnary(client);
                break;

            case "client_streaming":
                await InteropClient.RunClientStreamingAsync(client);

                break;

            case "server_streaming":
                await InteropClient.RunServerStreamingAsync(client);

                break;

            case "ping_pong":
                await InteropClient.RunPingPongAsync(client);

                break;

            case "empty_stream":
                await InteropClient.RunEmptyStreamAsync(client);

                break;

            case "cancel_after_begin":
                await InteropClient.RunCancelAfterBeginAsync(client);

                break;

            case "cancel_after_first_response":
                await InteropClient.RunCancelAfterFirstResponseAsync(client);

                break;

            case "timeout_on_sleeping_server":
                await InteropClient.RunTimeoutOnSleepingServerAsync(client);

                break;

            case "custom_metadata":
                await InteropClient.RunCustomMetadataAsync(client);

                break;

            case "status_code_and_message":
                await InteropClient.RunStatusCodeAndMessageAsync(client);

                break;

            default:
                throw new ArgumentException("Unsupported test case  " + testCase);
            }
        }
Example #2
0
 public async Task ServerStreaming()
 {
     await InteropClient.RunServerStreamingAsync(client);
 }