libp2p
    Preparing search index...

    Interface CreateStreamOptions

    An object that contains an AbortSignal as the optional signal property.

    const controller = new AbortController()

    aLongRunningOperation({
    signal: controller.signal
    })

    // later

    controller.abort
    interface CreateStreamOptions {
        inactivityTimeout?: number;
        maxReadBufferLength?: number;
        maxWriteBufferLength?: number;
        protocol?: string;
        signal?: AbortSignal;
    }

    Hierarchy (View Summary)

    Index

    Properties

    inactivityTimeout?: number

    If no data is sent or received in this number of ms the stream will be reset and an 'error' event emitted.

    120_000
    
    maxReadBufferLength?: number

    The maximum number of bytes to store when paused or before a 'message' event handler is added.

    If the internal buffer overflows this value the stream will be reset.

    4_194_304
    
    maxWriteBufferLength?: number

    The maximum number of bytes to store when the remote end of the stream is applying backpressure, or when it is slow to accept new bytes.

    If the internal buffer overflows this value the stream will be reset.

    Infinity
    
    protocol?: string

    If a single protocol was requested and the muxer has support for this, pre-negotiate the protocol using this value, otherwise multistream-select will be run over the stream after opening.

    signal?: AbortSignal