FirehoseConnection class final

An open firehose subscription: the message stream plus the close callback that tears the underlying socket down.

Firehose closes every connection it opens — after a clean close, after a stream error and on Firehose.stop — so the reconnect loop cannot leak sockets. close must therefore be safe to call more than once.

Constructors

FirehoseConnection(Stream<USyncSubscribeReposMessage> stream, {Future<void> close()?})
Returns the new instance of FirehoseConnection.
const

Properties

close Future<void> Function()?
Tears down the underlying socket, or null when there is nothing to tear down (an in-memory stream in a test, say).
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<USyncSubscribeReposMessage>
The decoded firehose message stream.
final

Methods

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