SseEvent class
One Server-Sent Event.
The wire format is line-oriented and dispatched by a blank line, so data
spanning several lines is emitted as several data: lines, and id/event,
which cannot span lines at all, have any newlines stripped.
Constructors
Properties
- data → String
-
The payload delivered to the browser's
EventSourceasevent.data.final - event → String?
-
The event name.
nullmeans the defaultmessagetype, which a listener receives viaonmessage; a name is delivered toaddEventListener(name, …)instead.final - hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
The event id. The browser remembers the last one it saw and replays it as
the
last-event-idheader when it reconnects, so a stream can resume.final - retry → Duration?
-
How long the browser should wait before reconnecting if the stream drops.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
encode(
) → String - This event in SSE wire form, terminated by the blank line that dispatches it.
-
encodeBytes(
) → List< int> - This event in SSE wire form, as UTF-8 bytes.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited