Interface TCP

Hierarchy

Index

Properties

Methods

Properties

public accepted: (...args: any[]) => any

public bubbleParent: boolean

public connected: (...args: any[]) => any

public error: (...args: any[]) => any

public host: string

public listenQueueSize: number

public port: number

public state: number

public timeout: number

Methods

public accept(options: AcceptDict)

Parameters

public addEventListener(name: string, callback: (...args: any[]) => any)

Parameters

  • name: string
  • callback: (...args: any[]) => any

public applyProperties(props: Dictionary)

Parameters

public close()

public connect()

public fireEvent(name: string, event: Dictionary)

Parameters

public getAccepted(): (...args: any[]) => any

Returns

(...args: any[]) => any

public getBubbleParent(): boolean

Returns

boolean

public getConnected(): (...args: any[]) => any

Returns

(...args: any[]) => any

public getError(): (...args: any[]) => any

Returns

(...args: any[]) => any

public getHost(): string

Returns

string

public getListenQueueSize(): number

Returns

number

public getPort(): number

Returns

number

public getState(): number

Returns

number

public getTimeout(): number

Returns

number

public isReadable(): boolean

Returns

boolean

public isWriteable(): boolean

Returns

boolean

public listen()

public read(buffer: Buffer, offset?: number, length?: number): number

Parameters

  • buffer: Buffer
  • offset?: number optional
  • length?: number optional

Returns

number

public removeEventListener(name: string, callback: (...args: any[]) => any)

Parameters

  • name: string
  • callback: (...args: any[]) => any

public setAccepted(accepted: (...args: any[]) => any)

Parameters

  • accepted: (...args: any[]) => any

public setBubbleParent(bubbleParent: boolean)

Parameters

  • bubbleParent: boolean

public setConnected(connected: (...args: any[]) => any)

Parameters

  • connected: (...args: any[]) => any

public setError(error: (...args: any[]) => any)

Parameters

  • error: (...args: any[]) => any

public setHost(host: string)

Parameters

  • host: string

public setListenQueueSize(listenQueueSize: number)

Parameters

  • listenQueueSize: number

public setPort(port: number)

Parameters

  • port: number

public setTimeout(timeout: number)

Parameters

  • timeout: number

public write(buffer: Buffer, offset?: number, length?: number): number

Parameters

  • buffer: Buffer
  • offset?: number optional
  • length?: number optional

Returns

number