Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MessageBuilder

class

MessageBuilder

extends

MessageBuilderBase

constructor
param
param

the security Mode

param

object that provides a constructObject(id) method

Hierarchy

  • MessageBuilderBase
    • MessageBuilder

Index

Constructors

constructor

Properties

_packetAssembler

_packetAssembler: PacketAssembler

_tick0

_tick0: number

_tick1

_tick1: number

channelId

channelId: number

cryptoFactory

cryptoFactory: CryptoFactory | null

Protected id

id: string

Protected messageChunks

messageChunks: Buffer[]

Protected messageHeader

messageHeader: any

options

options: object

Type declaration

Optional securityHeader

securityHeader: SecurityHeader

securityMode

securityMode: MessageSecurityMode

securityPolicy

securityPolicy: SecurityPolicy

sequenceHeader

sequenceHeader: SequenceHeader | null

signatureLength

signatureLength: number

Protected totalBodySize

totalBodySize: number

totalMessageSize

totalMessageSize: number

Static defaultMaxListeners

defaultMaxListeners: number

Methods

Protected _decodeMessageBody

  • _decodeMessageBody(fullMessageBody: Buffer): boolean

Protected _read_headers

  • _read_headers(binaryStream: BinaryStream): boolean

Protected _report_error

  • _report_error(errorMessage: string): false
  • Parameters

    • errorMessage: string

    Returns false

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

dispose

  • dispose(): void

emit

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

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

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

feed

  • feed(data: Buffer): void
  • Feed message builder with some data

    method

    feed

    Parameters

    • data: Buffer

    Returns void

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

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

    • type: string | symbol

    Returns number

listeners

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

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

pushNewToken

  • pushNewToken(securityToken: SecurityToken, derivedKeys: DerivedKeys | null): void

rawListeners

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

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

setSecurity

  • setSecurity(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy): void

Static listenerCount

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

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc