libp2p
    Preparing search index...

    Interface CircuitRelayTransportInit

    RelayConfig configures the circuit v2 relay transport.

    interface CircuitRelayTransportInit {
        discoveryFilter?: TopologyFilter;
        maxInboundStopStreams?: number;
        maxOutboundStopStreams?: number;
        maxReservationQueueLength?: number;
        reservationCompletionTimeout?: number;
        reservationConcurrency?: number;
        stopTimeout?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    discoveryFilter?: TopologyFilter

    An optional filter used to prevent duplicate attempts to reserve relay slots on the same peer

    maxInboundStopStreams?: number

    The maximum number of simultaneous STOP inbound streams that can be open at once - each inbound relayed connection uses a STOP stream

    300
    
    maxOutboundStopStreams?: number

    The maximum number of simultaneous STOP outbound streams that can be open at once. If this transport is used along with the relay server these settings should be set to the same value

    300
    
    maxReservationQueueLength?: number

    Limit the number of potential relays we will dial

    100
    
    reservationCompletionTimeout?: number

    When creating a reservation it must complete within this number of ms

    10_000
    
    reservationConcurrency?: number

    Multiple relays may be discovered simultaneously - to prevent listening on too many relays, this value controls how many to attempt to reserve a slot on at once. If set to more than one, we may end up listening on more relays than the maxReservations value, but on networks with poor connectivity the user may wish to attempt to reserve on multiple relays simultaneously.

    1
    
    stopTimeout?: number

    Incoming STOP requests (e.g. when a remote peer wants to dial us via a relay) must finish the initial protocol negotiation within this timeout in ms

    Configure connectionManager.inboundUpgradeTimeout instead