Parameters
- onLine: ((line: Uint8Array<ArrayBufferLike>, fieldLength: number, flush?: boolean) => void)
- (line, fieldLength, flush?): void
Parameters
- line: Uint8Array<ArrayBufferLike>
- fieldLength: number
Optional
flush: boolean
Returns void
Returns ((arr: Uint8Array<ArrayBufferLike>, flush?: boolean) => void)
A function that should be called for each incoming byte chunk.
- (arr, flush?): void
Parameters
- arr: Uint8Array<ArrayBufferLike>
Optional
flush: boolean
Returns void
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.