@qualithm/mqtt-wire - v0.1.5
    Preparing search index...

    Function decodeMqttString

    • Decodes a UTF-8 string with MQTT length prefix.

      MQTT strings are prefixed with a 2-byte big-endian length.

      Parameters

      • buffer: Uint8Array

        The buffer containing the length-prefixed string

      • offset: number

        The offset to start reading from

      Returns DecodeResult<MqttStringDecodeResult>

      DecodeResult with decoded string and bytes read, or error

      MQTT 5.0 §1.5.4