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

    Function readPacketFrame

    • Attempts to read a packet frame from a buffer.

      Returns frame information if a complete packet is available, or indicates if more data is needed or an error occurred.

      Parameters

      • buffer: Uint8Array

        The buffer to read from

      • offset: number

        Starting offset in the buffer

      • maxPacketSize: number = MAX_PACKET_SIZE

        Maximum allowed packet size (default: spec max)

      Returns FrameResult

      Frame result indicating complete, incomplete, or error