interface AbstractStreamInit {
    closeTimeout?: number;
    direction: Direction;
    id: string;
    log: Logger;
    metadata?: Record<string, unknown>;
    sendCloseWriteTimeout?: number;
    onAbort?(err): void;
    onCloseRead?(): void;
    onCloseWrite?(): void;
    onEnd?(err?): void;
    onReset?(): void;
}

Properties

closeTimeout?: number

How long to wait in ms for stream data to be written to the underlying connection when closing the writable end of the stream.

Default

500
direction: Direction

The stream direction

id: string

A unique identifier for this stream

log: Logger

A Logger implementation used to log stream-specific information

metadata?: Record<string, unknown>

User specific stream metadata

sendCloseWriteTimeout?: number

After the stream sink has closed, a limit on how long it takes to send a close-write message to the remote peer.

Methods