Enhanced streams for communication in-proc or across the Internet.
SimplexStream
is meant to allow two parties to communicate one direction.Stream
FullDuplexStream
creates a pair of bidirectional streams forMultiplexingStream
allows you to split any bidirectionalAsStream()
wraps a WebSocket
, System.IO.Pipelines.PipeReader
,System.IO.Pipelines.PipeWriter
, or System.IO.Pipelines.IDuplexPipe
with aSystem.IO.Stream
for reading and/or writing.UsePipe()
enables reading fromStream
or WebSocket
using the PipeReader
and PipeWriter
APIs.Stream.ReadSlice(long)
creates a sub-stream that ends afterPipeReader.ReadSlice(long)
creates a sub-PipeReader
that ends afterMonitoringStream
wraps another Stream and raises events forWriteSubstream
and ReadSubstream
allow you to serialize data ofSequence<T>
is a builder for ReadOnlySequence<T>
.PrefixingBufferWriter<T>
wraps another IBufferWriter<T>
BufferTextWriter
is a TextWriter
-derived type that canIBufferWriter<byte>
, making it more reusable than StreamWriter
SequenceTextReader
is a TextReader
-derived type that canReadOnlySequence<byte>
, making it more reusable than StreamReader
DuplexPipe
is a trivial implementation of IDuplexPipe
.Stream.ReadBlockAsync
guarantees to fill the supplied buffer except under certain documented conditions, instead of the regular ReadAsync
guarantee of supplying at least 1 byte.This project is supported by the .NET Foundation.