• Parses line buffers into EventSourceMessages.

    Parameters

    • OptionalonMessage: ((msg: EventSourceMessage) => void)

      A function that will be called on each message.

    • OptionalonId: ((id: string) => void)

      A function that will be called on each id field.

        • (id): void
        • Parameters

          • id: string

          Returns void

    • OptionalonRetry: ((retry: number) => void)

      A function that will be called on each retry field.

        • (retry): void
        • Parameters

          • retry: number

          Returns void

    Returns ((line: Uint8Array, fieldLength: number, flush?: boolean) => void)

    A function that should be called for each incoming line buffer.

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

        • line: Uint8Array
        • fieldLength: number
        • Optionalflush: boolean

        Returns void

""