Read-only stream contract.
read and readSync are intentionally generic and may return either
string or buffer depending on the concrete stream source.
Use readBuffer variants when you specifically need buffer.
@eryx/stream ModuleShared stream contracts for Eryx.
This module provides:
ReadableStream, WritableStream,
ReadWriteStream, and Stream) for static typing.fs.File, _socket.Socket, and _ssl.SslSocket can satisfy these
contracts directly via structural typing.readable: true/false and writable: true/false.nil means EOF (or closed peer for read-like operations).@eryx/_socket
via _socket.WOULD_BLOCK, not this shared module.Use @eryx/stdio for process-owned stream handles:
stdio.stdinstdio.stdoutstdio.stderrRead-only stream contract.
read and readSync are intentionally generic and may return either
string or buffer depending on the concrete stream source.
Use readBuffer variants when you specifically need buffer.
Write-only stream contract.
write and writeSync accept string | buffer to support both text and
binary producer code with one surface.
Duplex stream contract.
This is effectively ReadableStream & WritableStream with explicit tags.
Union of all stream capability variants.