StreamChannel<T> constructor

StreamChannel<T>(
  1. Stream<T> stream,
  2. StreamSink<T> sink
)

Creates a new StreamChannel that communicates over stream and sink.

Note that this stream/sink pair must provide the guarantees listed in the StreamChannel documentation. If they don't do so natively, StreamChannel.withGuarantees should be used instead.

Implementation

factory StreamChannel(Stream<T> stream, StreamSink<T> sink) =>
    _StreamChannel<T>(stream, sink);