Interface Transport

Hierarchy

  • Transport

Implemented by

Properties

connectedPeers: readonly string[]

IDs of all currently connected remote peers

localPeerId: string

The local peer ID, available after 'open' fires

Methods

  • Broadcast a message to all connected peers

    Parameters

    • data: unknown

    Returns Promise<void>

  • Connect to a remote peer by ID

    Parameters

    • remotePeerId: string

    Returns void

  • Send a message to a specific remote peer

    Parameters

    • remotePeerId: string
    • data: unknown

    Returns Promise<void>

Generated using TypeDoc