clientStream

inline suspend fun <S : Any, R : Any> GrpcClientStreamingCall<S, R>.clientStream(scope: CoroutineScope, crossinline block: suspend SendChannel<S>.() -> Unit): R

Executes a Client Streaming RPC call In this use case, all outbound request messages are sent before the inbound response message.

Return

The single response from the server

Parameters

scope

The CoroutineScope to use for the call. This will be used to create coroutines that will write the requests to the client message sync. It will also be the context for calling the block function

block

A function that will be called with a SendChannel that the caller can use to send requests to the server. The channel will automatically be closed when the block completes.