Class KeepAliveManager

Hierarchy

  • KeepAliveManager

Constructors

Properties

pingKeepAliveTimers: Map<string, Timer>
relay?: IRelay
relayKeepAliveTimers: Map<PeerId, Timer>

Methods

  • Parameters

    • peerId: PeerId
    • libp2pPing: ((peer: PeerId | Multiaddr, options?: AbortOptions) => Promise<number>)
        • (peer: PeerId | Multiaddr, options?: AbortOptions): Promise<number>
        • Pings the given peer in order to obtain the operation latency

          Example

          const latency = await libp2p.ping(otherPeerId)
          

          Parameters

          • peer: PeerId | Multiaddr
          • Optional options: AbortOptions

          Returns Promise<number>

    Returns void

Generated using TypeDoc