libp2p
    Preparing search index...

    Interface ConnectionManagerInit

    interface ConnectionManagerInit {
        addressSorter?: AddressSorter;
        allow?: string[];
        deny?: string[];
        dialTimeout?: number;
        inboundConnectionThreshold?: number;
        inboundStreamProtocolNegotiationTimeout?: number;
        inboundUpgradeTimeout?: number;
        maxConnections?: number;
        maxDialQueueLength?: number;
        maxIncomingPendingConnections?: number;
        maxParallelDials?: number;
        maxParallelReconnects?: number;
        maxPeerAddrsToDial?: number;
        outboundStreamProtocolNegotiationTimeout?: number;
        outboundUpgradeTimeout?: number;
        protocolNegotiationTimeout?: number;
        reconnectBackoffFactor?: number;
        reconnectRetries?: number;
        reconnectRetryInterval?: number;
        resolvers?: Record<string, Resolver<AbortOptions>>;
    }
    Index

    Properties

    addressSorter?: AddressSorter

    Sort the known addresses of a peer before trying to dial, By default public addresses will be dialled before private (e.g. loopback or LAN) addresses.

    allow?: string[]

    A list of multiaddrs that will always be allowed (except if they are in the deny list) to open connections to this node even if we've reached maxConnections

    deny?: string[]

    A list of multiaddrs that will never be allowed to open connections to this node under any circumstances

    dialTimeout?: number

    How long a dial attempt is allowed to take, including DNS resolution of the multiaddr, opening a socket and upgrading it to a Connection.

    10_000
    
    inboundConnectionThreshold?: number

    If more than this many connections are opened per second by a single host, reject subsequent connections.

    5
    
    inboundStreamProtocolNegotiationTimeout?: number

    Inbound protocol negotiation must complete within this number of ms

    10_000
    
    inboundUpgradeTimeout?: number

    When a new incoming connection is opened, the upgrade process (e.g. protect, encrypt, multiplex etc) must complete within this number of ms.

    10_000
    
    maxConnections?: number

    The maximum number of connections libp2p is willing to have before it starts pruning connections to reduce resource usage.

    300/100
    
    maxDialQueueLength?: number

    The maximum size the dial queue is allowed to grow to. Promises returned when dialing peers after this limit is reached will not resolve until the queue size falls beneath this size.

    500
    
    maxIncomingPendingConnections?: number

    The maximum number of parallel incoming connections allowed that have yet to complete the connection upgrade - e.g. choosing connection encryption, muxer, etc.

    10
    
    maxParallelDials?: number

    The maximum number of dials across all peers to execute in parallel.

    100/50
    
    maxParallelReconnects?: number

    When a peers tagged with KEEP_ALIVE disconnect, reconnect to this many at once.

    5
    
    maxPeerAddrsToDial?: number

    Maximum number of addresses allowed for a given peer before giving up

    25
    
    outboundStreamProtocolNegotiationTimeout?: number

    Outbound protocol negotiation must complete within this number of ms.

    Does not apply if an abort signal is passed to the .dial or .dialProtocol method of the ConnectionManager or the openStream method of the Connection.

    10_000
    
    outboundUpgradeTimeout?: number

    When a new outbound connection is opened, the upgrade process (e.g. protect, encrypt, multiplex etc) must complete within this number of ms.

    Does not apply if an abort signal is passed to the .dial method.

    This is handled by dialTimeout

    protocolNegotiationTimeout?: number

    Protocol negotiation must complete within this number of ms

    2000
    

    use outboundStreamProtocolNegotiationTimeout or inboundStreamProtocolNegotiationTimeout instead

    reconnectBackoffFactor?: number

    When a peer tagged with KEEP_ALIVE disconnects, apply this multiplication factor to the time interval between each retry.

    2
    
    reconnectRetries?: number

    When a peer tagged with KEEP_ALIVE disconnects, attempt to redial them this many times.

    5
    
    reconnectRetryInterval?: number

    When a peer tagged with KEEP_ALIVE disconnects, wait this long between each retry. Note this will be multiplied by reconnectFactor to create an increasing retry backoff.

    1000
    
    resolvers?: Record<string, Resolver<AbortOptions>>

    Multiaddr resolvers to use when dialling