Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WebSocketAdapter

Adapter for WebSocket implementations

Hierarchy

  • WebSocketAdapter

Implemented by

Index

Methods

addEventListener

  • addEventListener(handler: string, eventListener: EventListener): void
  • Add an event listener for one of the handler types.

    Parameters

    • handler: string

      The handler being assigned.

    • eventListener: EventListener

      The event listener to add.

    Returns void

close

  • close(code?: number, reason?: string): void

create

  • create(url: string, protocols: string[], isSignedUrl?: boolean): void
  • Opens a WebSocket connection to the URL with the given protocols.

    Parameters

    • url: string

      URL to connect to

    • protocols: string[]

      Protocols to send when establishing the connection

    • Optional isSignedUrl: boolean

      whether the URL is signed

    Returns void

destroy

  • destroy(): void

readyState

send

  • send(message: Uint8Array | string): boolean

Generated using TypeDoc