• Parses arbitary byte chunks into EventSource line buffers. Each line should be of the format "field: value" and ends with \r, \n, or \r\n.

    Parameters

    • onLine: ((line, fieldLength, flush?) => void)

      A function that will be called on each new EventSource line.

        • (line, fieldLength, flush?): void
        • Parameters

          • line: Uint8Array
          • fieldLength: number
          • Optional flush: boolean

          Returns void

    Returns ((arr, flush?) => void)

    A function that should be called for each incoming byte chunk.

      • (arr, flush?): void
      • Parameters

        • arr: Uint8Array
        • Optional flush: boolean

        Returns void

Generated using TypeDoc