ServerSentEventsClient class
Consumes HTTP event streams with bounded reconnects and last-event IDs. Supply and cancel a token to release a connection whose stream is stalled.
Constructors
- ServerSentEventsClient(HttpClient client, {int maxReconnects = 3, Duration reconnectDelay = const Duration(seconds: 1)})
Properties
- client → HttpClient
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxReconnects → int
-
final
- reconnectDelay → Duration
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
connect(
Uri uri, {CancellationToken? cancellationToken}) → Stream< ServerSentEvent> -
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