Class ConnectionManager

Hierarchy

  • ConnectionManager

Constructors

Properties

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

Type declaration

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