serverStreamingServerMethodDefinition

Creates a ServerMethodDefinition that implements the specified server-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 collect the flow returned by implementation and send the emitted values back to the client.

When the RPC is received, this method definition will pass the request 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 unaryServerMethodDefinition.

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

Sources

jvm source
Link copied to clipboard