Disconnector<T> class Null safety

Allows the caller to force a channel to disconnect.

When disconnect is called, the channel (or channels) transformed by this transformer will act as though the remote end had disconnected—the stream will emit a done event, and the sink will ignore future inputs. The inner sink will also be closed to notify the remote end of the disconnection.

If a channel is transformed after the disconnect has been called, it will be disconnected immediately.

Implemented types

Constructors

Disconnector()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
isDisconnected bool
Whether disconnect has been called.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

bind(StreamChannel<T> channel) StreamChannel<T>
Transforms the events sent to and emitted by channel.
override
disconnect() Future<void>
Disconnects all channels that have been transformed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited