Options
All
  • Public
  • Public/Protected
  • All
Menu

  subscribe now with sterfive to access the online-user manual

Hierarchy

Index

Constructors

constructor

  • Returns TCP_transport

Properties

_socket

_socket: Socket

bytesRead

bytesRead: number

bytesWritten

bytesWritten: number

chunkReadCount

chunkReadCount: number

chunkWrittenCount

chunkWrittenCount: number

name

name: string

protocolVersion

protocolVersion: number

indicates the version number of the OPCUA protocol used

default

0

Readonly Static captureRejectionSymbol

captureRejectionSymbol: typeof captureRejectionSymbol

Static captureRejections

captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Static defaultMaxListeners

defaultMaxListeners: number

Readonly Static errorMonitor

errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Accessors

isDisconnecting

  • get isDisconnecting(): boolean
  • Returns boolean

timeout

  • get timeout(): number
  • set timeout(value: number): any
  • Returns number

  • Parameters

    • value: number

    Returns any

Methods

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): TCP_transport
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TCP_transport

createChunk

  • createChunk(msgType: string, chunkType: string, length: number): Buffer
  • createChunk is used to construct a pre-allocated chunk to store up to length bytes of data. The created chunk includes a prepended header for chunk_type of size self.headerSize.

    method

    createChunk

    Parameters

    • msgType: string
    • chunkType: string

      chunk type. should be 'F' 'C' or 'A'

    • length: number

    Returns Buffer

    a buffer object with the required length representing the chunk.

    Note:

    • only one chunk can be created at a time.
    • a created chunk should be committed using the write method before an other one is created.

disconnect

  • disconnect the TCP layer and close the underlying socket. The "close" event will be emitted to the observers with err=null.

    method

    disconnect

    async

    Parameters

    Returns void

dispose

  • dispose(): void
  • Returns void

emit

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

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

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getMaxListeners

  • getMaxListeners(): number
  • Returns number

isValid

  • isValid(): boolean
  • Returns boolean

listenerCount

  • listenerCount(event: string | symbol): number
  • Parameters

    • event: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): TCP_transport
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TCP_transport

on

  • on(event: string | symbol, listener: (...args: any[]) => void): TCP_transport
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TCP_transport

once

  • once(event: string | symbol, listener: (...args: any[]) => void): TCP_transport
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TCP_transport

prematureTerminate

  • prematureTerminate(err: Error): void
  • Parameters

    • err: Error

    Returns void

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): TCP_transport
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TCP_transport

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): TCP_transport
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TCP_transport

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • Parameters

    • Optional event: string | symbol

    Returns TCP_transport

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): TCP_transport
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TCP_transport

setMaxListeners

  • Parameters

    • n: number

    Returns TCP_transport

write

  • write(messageChunk: Buffer): void
  • write the message_chunk on the socket.

    method

    write

    Parameters

    • messageChunk: Buffer

      Notes:

      • the message chunk must have been created by createChunk.
      • once a message chunk has been written, it is possible to call createChunk again.

    Returns void

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Static on

  • on(emitter: EventEmitter, event: string): AsyncIterableIterator<any>
  • Parameters

    • emitter: EventEmitter
    • event: string

    Returns AsyncIterableIterator<any>

Static once

  • once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>
  • once(emitter: DOMEventTarget, event: string): Promise<any[]>
  • Parameters

    • emitter: NodeEventTarget
    • event: string | symbol

    Returns Promise<any[]>

  • Parameters

    • emitter: DOMEventTarget
    • event: string

    Returns Promise<any[]>

Generated using TypeDoc