Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ButtplugNodeWebsocketClientConnector

Connector class for using the node ws library as a websocket client to a buttplug server. Users should build an instance of this class and pass it to the ButtplugClient.Connect() function.

Hierarchy

  • EventEmitter
    • ButtplugNodeWebsocketClientConnector

Implements

  • IButtplugConnector

Index

Constructors

constructor

  • Parameters

    • url: string

      URL of buttplug server to connect to

    • rejectUnauthorized: boolean

      If true, reject unauthorized certificates that fail verification

    Returns ButtplugNodeWebsocketClientConnector

Properties

Static defaultMaxListeners

defaultMaxListeners: number

Accessors

Connected

  • get Connected(): boolean
  • Called by ButtplugClient to verify connection status.

    Returns boolean

Methods

Connect

  • Connect(): Promise<void>
  • Called by ButtplugClient to establish websocket connection.

    Returns Promise<void>

Disconnect

  • Disconnect(): void
  • Called by ButtplugClient to disconnect websocket connection.

    Returns void

Send

  • Send(msg: any): void
  • Called by ButtplugClient to send a message over the websocket.

    Parameters

    • msg: any

    Returns void

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

on

  • on(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc