Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PostMessageTransport<T, K>

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

Protected _isConnected

_isConnected: TransportStatus = ...

The status of the transport

Protected client

client: PostMessageClient

The client handling the encryption/decryption of messages

Protected Readonly name

name: string

The name of the app

Protected Optional newPeerListener

newPeerListener: (peer: T) => void

The listener that will be invoked when a new peer is connected

Type declaration

    • (peer: T): void
    • Parameters

      • peer: T

      Returns void

Protected Readonly peerManager

peerManager: PeerManager<K>

Readonly type

type: TransportType = ...

The type of the transport

Accessors

connectionStatus

Methods

addListener

  • addListener(listener: (message: unknown, connectionInfo: ConnectionContext) => void): Promise<void>

addPeer

  • addPeer(newPeer: T): Promise<void>

connect

  • connect(): Promise<void>

disconnect

  • disconnect(): Promise<void>

getPairingRequestInfo

getPeers

  • getPeers(): Promise<T[]>

listen

  • listen(publicKey: string): Promise<void>

Protected notifyListeners

  • notifyListeners(message: unknown, connectionInfo: ConnectionContext): Promise<void>

removeAllPeers

  • removeAllPeers(): Promise<void>

removeListener

  • removeListener(listener: (message: string, connectionInfo: ConnectionContext) => void): Promise<void>

removePeer

  • removePeer(peerToBeRemoved: T): Promise<void>

send

  • send(message: string, peer?: PeerInfo): Promise<void>

startOpenChannelListener

  • startOpenChannelListener(): Promise<void>

Static getAvailableExtensions

  • getAvailableExtensions(): Promise<Extension[]>

Static isAvailable

  • isAvailable(): Promise<boolean>

Generated using TypeDoc