sendStream<TResponse extends Object?> method

Stream<TResponse> sendStream<TResponse extends Object?>(
  1. Stream<Request<TResponse>> requestStream
)

Sends a requestStream to a single RequestHandler.

Make sure the RequestHandler is registered before calling this method.

This request can be wrapped by PipelineBehavior's see pipeline.

This will return TResponse.

Implementation

Stream<TResponse> sendStream<TResponse extends Object?>(
  Stream<Request<TResponse>> requestStream,
) async* {
  await for (final request in requestStream) {
    yield await send(request);
  }
}