Options
All
  • Public
  • Public/Protected
  • All
Menu

Abstract base for implementing transports. Implements common behavior to help with tracking of peers.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected debug

debug: Debugger

Protected Readonly peers

peers: Set<Peer>

Accessors

onPeerConnect

  • get onPeerConnect(): Subscribable<this, [peer: Peer]>

started

  • get started(): boolean

transportOptions

Methods

Protected addPeer

  • addPeer(peer: Peer): void
  • Add a peer to this transport. This will start monitoring this peer for connection events and make it available/unavailable as it connects/disconnects.

    Parameters

    • peer: Peer
      • peer to track

    Returns void

start

stop

  • stop(): Promise<boolean>

Generated using TypeDoc