Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Uint8ArrayWriteBuffer

The default WriteBuffer implementation. Uses a {@link Uint8Array} for buffering. The Uint8ArrayWriteBuffer.onCommit hook can be used to rect to on-commit events. After the Uint8ArrayWriteBuffer.commit method has been called the buffer is disposed and can no longer be used for writing data. If the writer buffer is no longer needed but the message has not been committed yet it has to be disposed manually.

Hierarchy

  • Uint8ArrayWriteBuffer

Implements

Index

Constructors

Properties

encoder: TextEncoder = ...
isDisposed: boolean = false
msg: DataView
offset: number
onCommitEmitter: Emitter<Uint8Array> = ...

Accessors

  • get onCommit(): Event<Uint8Array>

Methods

  • commit(): void
  • dispose(): void
  • getCurrentContents(): Uint8Array