Class Transport<T, K, S>Abstract

Internalapi

Type Parameters

Hierarchy

  • Transport

Constructors

Properties

_isConnected: TransportStatus = TransportStatus.NOT_CONNECTED

The status of the transport

client: S

The client handling the encryption/decryption of messages

listeners: ((message, connectionInfo) => void)[] = []

The listeners that will be notified when new messages are coming in

Type declaration

    • (message, connectionInfo): void
    • Parameters

      Returns void

name: string

The name of the app

newPeerListener?: ((peer) => void)

Type declaration

    • (peer): void
    • The listener that will be invoked when a new peer is connected

      Parameters

      • peer: T

      Returns void

peerManager: PeerManager<K>
type: TransportType = TransportType.POST_MESSAGE

The type of the transport

Accessors

Methods

  • Add a listener to be called when a new message is received

    Parameters

    • listener: ((message, connectionInfo) => void)

      The listener that will be registered

        • (message, connectionInfo): void
        • Parameters

          Returns void

    Returns Promise<void>

Generated using TypeDoc