Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ISocket

Hierarchy

  • ISocket

Implemented by

Index

Properties

Optional handshakeResponse

handshakeResponse: function

Type declaration

    • (response: any): void
    • Parameters

      • response: any

      Returns void

Optional id

id: number

Optional remoteAddress

remoteAddress: object

Type declaration

  • ip: string
  • Optional port?: number

Optional sendForce

sendForce: function

Type declaration

    • (response: any): void
    • Parameters

      • response: any

      Returns void

state

state: number

Methods

disconnect

  • disconnect(): void

emit

  • emit(evt: "heartbeat"): void
  • emit(evt: "message", pkg: any): void
  • emit(evt: "handshake", pkg: any): void

on

  • on(evt: "disconnect", listener: function): void
  • on(evt: "error", listener: function): void
  • on(evt: "message", listener: function): void
  • Parameters

    • evt: "disconnect"
    • listener: function
        • (): void
        • Returns void

    Returns void

  • Parameters

    • evt: "error"
    • listener: function
        • (): void
        • Returns void

    Returns void

  • Parameters

    • evt: "message"
    • listener: function
        • (msg: any): void
        • Parameters

          • msg: any

          Returns void

    Returns void

once

  • once(evt: "disconnect", listener: function): void
  • once(evt: "error", listener: function): void
  • Parameters

    • evt: "disconnect"
    • listener: function
        • (): void
        • Returns void

    Returns void

  • Parameters

    • evt: "error"
    • listener: function
        • (): void
        • Returns void

    Returns void

send

  • send(msg: any): void

sendBatch

  • sendBatch(msgs: any[]): void

sendRaw

  • sendRaw(msg: any): void