Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WSAcceptor

Hierarchy

  • EventEmitter
    • WSAcceptor

Index

Constructors

constructor

  • new WSAcceptor(opts: AcceptorOpts, cb: function): WSAcceptor

Properties

_interval

_interval: any

bufferMsg

bufferMsg: any

cb

cb: any

closed

closed: boolean

inited

inited: boolean

interval

interval: number

msgQueues

msgQueues: object

Type declaration

  • [key: string]: any

rpcDebugLog

rpcDebugLog: any

rpcLogger

rpcLogger: any

server

server: any

sockets

sockets: object

Type declaration

  • [key: string]: any

whitelist

whitelist: any

Static defaultMaxListeners

defaultMaxListeners: number

Methods

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

cloneError

  • cloneError(origin: object): object

close

  • close(): void

emit

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

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

    Returns boolean

enqueue

eventNames

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

flush

getMaxListeners

  • getMaxListeners(): number
  • Returns number

ipFilter

  • ipFilter(obj: any): void

listen

  • listen(port: string | number): void

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

processMsg

  • processMsg(socket: any, acceptor: WSAcceptor, pkg: AcceptorPkg): void

processMsgs

  • processMsgs(socket: any, acceptor: WSAcceptor, pkgs: Array<AcceptorPkg>): void

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