Options
All
  • Public
  • Public/Protected
  • All
Menu

  subscribe now with sterfive to access the online-user manual

Hierarchy

Index

Constructors

constructor

Properties

_socket

_socket: Socket

bytesRead

bytesRead: number

bytesWritten

bytesWritten: number

chunkReadCount

chunkReadCount: number

chunkWrittenCount

chunkWrittenCount: number

maxChunkCount

maxChunkCount: number

maxMessageSize

maxMessageSize: number

name

name: string

protocolVersion

protocolVersion: number

indicates the version number of the OPCUA protocol used

receiveBufferSize

receiveBufferSize: number

sendBufferSize

sendBufferSize: number

Static throttleTime

throttleTime: number

Accessors

isDisconnecting

  • get isDisconnecting(): boolean
  • Returns boolean

timeout

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

  • Parameters

    • value: number

    Returns void

Methods

abortWithError

  • Parameters

    Returns void

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

init

  • Initialize the server transport.

    The ServerTCP_transport initialization process starts by waiting for the client to send a "HEL" message.

    The ServerTCP_transport replies with a "ACK" message and then start waiting for further messages of any size.

    The callback function received an error:

    • if no message from the client is received within the self.timeout period,
    • or, if the connection has dropped within the same interval.
    • if the protocol version specified within the HEL message is invalid or is greater than self.protocolVersion

    Parameters

    Returns void

isValid

  • isValid(): boolean
  • Returns boolean

on

  • Parameters

    • eventName: "message"
    • eventHandler: (message: Buffer) => void
        • (message: Buffer): void
        • Parameters

          • message: Buffer

          Returns void

    Returns ServerTCP_transport

  • Parameters

    • eventName: "socket_closed"
    • eventHandler: (err: Error) => void
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns ServerTCP_transport

  • Parameters

    • eventName: "close"
    • eventHandler: (err: Error) => void
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns ServerTCP_transport

once

  • Parameters

    • eventName: "message"
    • eventHandler: (message: Buffer) => void
        • (message: Buffer): void
        • Parameters

          • message: Buffer

          Returns void

    Returns ServerTCP_transport

  • Parameters

    • eventName: "socket_closed"
    • eventHandler: (err: Error) => void
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns ServerTCP_transport

  • Parameters

    • eventName: "close"
    • eventHandler: (err: Error) => void
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns ServerTCP_transport

prematureTerminate

  • prematureTerminate(err: Error): void

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

Generated using TypeDoc