SseConnection class
A bi-directional SSE connection between server and browser.
- Inheritance
-
- Object
- StreamChannelMixin<
String?> - SseConnection
Constructors
- SseConnection(Sink _sink, {Duration? keepAlive})
-
Creates an SseConnection for the supplied
_sink
.
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- isInKeepAlivePeriod → bool
-
Whether this connection is currently in the KeepAlive timeout period.
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
sink
→ StreamSink<
String> -
The message added to the sink has to be JSON encodable.
read-onlyoverride
-
stream
→ Stream<
String> -
Stream of messages sent from the server to this client.
read-onlyoverride
Methods
-
cast<
S> () → StreamChannel< S> -
Returns a copy of this with the generic type coerced to
S
.inherited -
changeSink(
StreamSink< String?> change(StreamSink<String?> )) → StreamChannel<String?> -
Returns a copy of this with sink replaced by
change
's return value.inherited -
changeStream(
Stream< String?> change(Stream<String?> )) → StreamChannel<String?> -
Returns a copy of this with stream replaced by
change
's return value.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pipe(
StreamChannel< String?> other) → void -
Connects this to
other
, so that any values emitted by either are sent directly to the other.inherited -
shutdown(
) → void - Immediately close the connection, ignoring any keepAlive period.
-
toString(
) → String -
A string representation of this object.
inherited
-
transform<
S> (StreamChannelTransformer< S, String?> transformer) → StreamChannel<S> -
Transforms this using
transformer
.inherited -
transformSink(
StreamSinkTransformer< String?, String?> transformer) → StreamChannel<String?> -
Transforms only the sink component of this using
transformer
.inherited -
transformStream(
StreamTransformer< String?, String?> transformer) → StreamChannel<String?> -
Transforms only the stream component of this using
transformer
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited