Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UhstHost

Hierarchy

  • UhstHost

Index

Constructors

constructor

Properties

Private _ee

_ee: EventEmitter<HostEventSet> = new EventEmitter<HostEventSet>()

Private clients

clients: Map<string, UhstSocket> = new Map<string, UhstSocket>()

Private config

Private debug

debug: boolean

Private relayClient

relayClient: UhstRelayClient

Private Optional relayMessageStream

relayMessageStream: MessageStream

Private socketProvider

socketProvider: UhstSocketProvider

Accessors

hostId

  • get hostId(): string

Methods

broadcast

  • broadcast(message: string): Promise<any>
  • broadcast(message: Blob): Promise<any>
  • broadcast(message: ArrayBuffer): Promise<any>
  • broadcast(message: ArrayBufferView): Promise<any>

disconnect

  • disconnect(): void

Private handleMessage

Private handleRelayError

  • handleRelayError(): void

Private handleRelayEvent

Private init

  • init(requestedHostId?: undefined | string): Promise<void>
  • Parameters

    • Optional requestedHostId: undefined | string

    Returns Promise<void>

off

  • off<EventName>(eventName: EventName, handler: HostEventSet[EventName]): void
  • Type parameters

    Parameters

    • eventName: EventName
    • handler: HostEventSet[EventName]

    Returns void

on

  • on<EventName>(eventName: EventName, handler: HostEventSet[EventName]): void
  • Type parameters

    Parameters

    • eventName: EventName
    • handler: HostEventSet[EventName]

    Returns void

once

  • once<EventName>(eventName: EventName, handler: HostEventSet[EventName]): void
  • Type parameters

    Parameters

    • eventName: EventName
    • handler: HostEventSet[EventName]

    Returns void

Generated using TypeDoc