edgeport - v1.0.3
    Preparing search index...

    Function decodeFrame

    • Reads and decodes one STOMP frame from a framed reader.

      Reads the command line and headers, then the body: when a content-length header is present it reads exactly that many bytes and consumes the trailing NUL, otherwise it reads up to the first NUL. Leading blank lines (heart-beat newlines) before a command are skipped.

      Parameters

      • reader: FramedReader

        The framed reader to pull from.

      • OptionaltimeoutMs: number

        Optional read deadline applied to each underlying read.

      Returns Promise<StompFrame>

      The decoded frame.

      If the frame is malformed.

      If the stream ends mid-frame.

      If a read exceeds timeoutMs.

      1.0.0

      import { decodeFrame } from 'edgeport/stomp';
      // const frame = await decodeFrame(socket.reader);