Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • WebSocket

Index

Properties

binaryType

binaryType: string

Methods

addEventListener

  • addEventListener(method: "open", cb: () => void): void
  • addEventListener(method: "message", cb: (event: { data: string | ArrayBuffer | Buffer | Buffer[] }) => void): void
  • addEventListener(method: "close", cb: () => void): void
  • addEventListener(method: "error", cb: (event: { error: any }) => void): void
  • Parameters

    • method: "open"
    • cb: () => void
        • (): void
        • Returns void

    Returns void

  • Parameters

    • method: "message"
    • cb: (event: { data: string | ArrayBuffer | Buffer | Buffer[] }) => void
        • (event: { data: string | ArrayBuffer | Buffer | Buffer[] }): void
        • Parameters

          • event: { data: string | ArrayBuffer | Buffer | Buffer[] }
            • data: string | ArrayBuffer | Buffer | Buffer[]

          Returns void

    Returns void

  • Parameters

    • method: "close"
    • cb: () => void
        • (): void
        • Returns void

    Returns void

  • Parameters

    • method: "error"
    • cb: (event: { error: any }) => void
        • (event: { error: any }): void
        • Parameters

          • event: { error: any }
            • error: any

          Returns void

    Returns void

close

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

send

  • send(data: ArrayBuffer): void

Generated using TypeDoc