SseLineDecoder class final
Transforms a stream of byte chunks into a stream of lines.
Handles all three SSE line delimiters: \r\n, \r, and \n,
including delimiters split across chunk boundaries.
Lines exceeding maxLineLength bytes are discarded and a StateError is added to the output stream.
Used only by the dart:io transport — the web transport relies on the browser's native EventSource which handles line splitting.
- Implemented types
Constructors
- SseLineDecoder({int maxLineLength = 1024 * 1024})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxLineLength → int
-
Maximum allowed line length in bytes. Lines exceeding this limit
are discarded and an error is emitted. Defaults to 1 MB.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bind(
Stream< List< stream) → Stream<int> >String> -
Transforms the provided
stream.override -
cast<
RS, RT> () → StreamTransformer< RS, RT> -
Provides a
StreamTransformer<RS, RT>view of this stream transformer.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited