Options
All
  • Public
  • Public/Protected
  • All
Menu

Class JsonSocket

Hierarchy

  • JsonSocket

Index

Constructors

constructor

Properties

Private buffer

buffer: string = ""

Private contentLength

contentLength: number | null = null

Private delimeter

delimeter: "#" = "#"

Private isClosed

isClosed: boolean = false

socket

socket: Socket

Private stringDecoder

stringDecoder: any = new StringDecoder()

Accessors

netSocket

  • get netSocket(): any

Methods

connect

  • connect(port: number, host: string): this

end

  • end(): this

Private formatMessageData

  • formatMessageData(message: any): string

Private handleData

  • handleData(data: string): void

Private handleMessage

  • handleMessage(data: string): void

on

  • on(event: string, callback: function): this

Private onData

  • onData(dataRaw: Buffer | string): void

once

  • once(event: string, callback: function): this

sendMessage

  • sendMessage(message: any, callback?: function): void

Generated using TypeDoc