Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WriteableMessage

A writable message that can be serialised into a BufferOutputStream

Hierarchy

Index

Constructors

constructor

Properties

Readonly data

data: Uint8Array

The message's data

Readonly encoding

encoding: encoding

The message encoding

Readonly headers

headers: string[]

Additional message headers

Optional Readonly id

id: undefined | number

The message ID

Private stream

The output stream

Optional Readonly topic

topic: undefined | string

A topic associated with the message

Readonly type

type: types

The message type

Methods

getBuffer

  • getBuffer(): Uint8Array
  • Get the buffer

    Returns Uint8Array

    the buffer that the output has been written into

getInputStream

  • Create an input stream from the message's data

    Returns BufferInputStream

    an input stream that can be deserialised

getStream

  • Get the output stream

    Returns BufferOutputStream

    the output stream that writes into the message's data buffer

Copyright © 2025 DiffusionData Ltd. All Rights Reserved.