Class ConnectionManager

Hierarchy

Constructors

Properties

currentActiveDialCount: number = 0
dialAttemptsForPeer: Map<string, number> = ...
dialErrorsForPeer: Map<string, any> = ...
keepAliveManager: KeepAliveManager
libp2p: Libp2p
onEventHandlers: {
    peer:connect: ((evt: CustomEvent<PeerId>) => void);
    peer:disconnect: (() => ((evt: CustomEvent<PeerId>) => void));
    peer:discovery: ((evt: CustomEvent<PeerInfo>) => void);
} = ...

Type declaration

pendingPeerDialQueue: PeerId[] = []
instances: Map<string, ConnectionManager> = ...

Methods

  • Checks if the peer is dialable based on the following conditions:

    1. If the peer is a bootstrap peer, it is only dialable if the number of current bootstrap connections is less than the max allowed.
    2. If the peer is not a bootstrap peer

    Parameters

    • peerId: PeerId

    Returns Promise<boolean>

Generated using TypeDoc