Interface UDP

Hierarchy

Index

Properties

Methods

Properties

public bubbleParent: boolean

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

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

public port: number

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

Methods

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

Parameters

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

public applyProperties(props: Dictionary)

Parameters

public close()

public fireEvent(name: string, event: Dictionary)

Parameters

public getBubbleParent(): boolean

Returns

boolean

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

Returns

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

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

Returns

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

public getPort(): number

Returns

number

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

Returns

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

public isReadable(): boolean

Returns

boolean

public isWriteable(): boolean

Returns

boolean

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 sendBytes(port: number, host: string, data: Array<Number>)

Parameters

  • port: number
  • host: string
  • data: Array<Number>

public sendString(port: number, host: string, data: string)

Parameters

  • port: number
  • host: string
  • data: string

public setBubbleParent(bubbleParent: boolean)

Parameters

  • bubbleParent: boolean

public setData(data: (...args: any[]) => any)

Parameters

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

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

Parameters

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

public setPort(port: number)

Parameters

  • port: number

public setStarted(started: (...args: any[]) => any)

Parameters

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

public start(port: number)

Parameters

  • port: number

public stop()

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

Parameters

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

Returns

number