Options
All
  • Public
  • Public/Protected
  • All
Menu

Peer that connects via a binary streaming protocol.

Hierarchy

Index

Constructors

constructor

Properties

Protected debug

debug: Debugger

Protected disconnected

disconnected: boolean = false

id

id: ArrayBuffer

The unique identifier of this peer.

Protected Optional stream

stream?: Duplex

Protected Readonly transportOptions

transportOptions: TransportOptions

Protected Optional version

version?: number

Accessors

connected

  • get connected(): boolean

latency

  • get latency(): number

onConnect

  • get onConnect(): Subscribable<this, []>

onData

onDisconnect

  • get onDisconnect(): Subscribable<this, []>

Methods

Protected abort

Protected didConnect

  • didConnect(): void

disconnect

  • disconnect(): void

Protected forceConnect

  • forceConnect(id: ArrayBuffer): void

Protected handleDisconnect

hasStream

  • hasStream(): boolean

Protected localPublicSecurity

  • localPublicSecurity(): undefined | ArrayBuffer

Protected negotiateAsClient

  • negotiateAsClient(): void

Protected negotiateAsServer

  • negotiateAsServer(): void

Protected queueNegotiationTimeout

  • queueNegotiationTimeout(): void

Protected receiveData

Protected remotePublicSecurity

  • remotePublicSecurity(): undefined | ArrayBuffer

Protected requestDisconnect

send

  • send<T>(type: T, message: PeerMessage<T>): Promise<void>

Protected setStream

  • setStream(stream: Duplex, client: boolean): void

Generated using TypeDoc