Hierarchy (View Summary)

Implements

Constructors

Methods

Constructors

Methods

  • Decode a frame from a buffer

    Important implementation notice: When returning byte arrays, make sure that the returned array is not a view into the original buffer, as the underlying buffer may get invalidated

    Parameters

    • reader: Bytes
    • eof: boolean

    Returns null | Uint8Array

  • Encode a frame into a writable stream

    Parameters

    • frame: Uint8Array
    • into: ISyncWritable

    Returns void

  • For codecs that use crypto functions and/or logging. This method is called before any other.

    Parameters

    Returns void

  • Initial tag of the codec. Will be sent immediately once connected.

    Returns Uint8Array