bidi Streaming Server Method Definition
fun <RequestT, ResponseT> bidiStreamingServerMethodDefinition(context: CoroutineContext, descriptor: MethodDescriptor<RequestT, ResponseT>, implementation: (requests: Flow<RequestT>) -> Flow<ResponseT>): ServerMethodDefinition<RequestT, ResponseT>(source)
Creates a ServerMethodDefinition that implements the specified bidirectional-streaming RPC method by running the specified implementation and associated implementation details within a per-RPC CoroutineScope generated with the specified CoroutineContext.
When the RPC is received, this method definition will pass a Flow of requests from the client to implementation, and collect the returned Flow, sending responses to the client as they are emitted.
Exceptions and cancellation are handled as in clientStreamingServerMethodDefinition and as in serverStreamingServerMethodDefinition.
Parameters
context
The context of the scopes the RPC implementation will run in
descriptor
The descriptor of the method being implemented
implementation
The implementation of the RPC method