SpscReceiver<T> class final

Available extensions

Constructors

SpscReceiver.fromTransferable(Map<String, Object?> data)
Reconstructs a remote-only receiver from a transferable representation.
factory

Properties

buf → ChannelBuffer<T>
Gets the remote buffer, initializing connection via Expando if needed.
no setterinherited
channelId int
The local ID of the channel.
final
hashCode int
The hash code for this object.
no setterinherited
isRecvClosed bool
Whether this handle is closed for receiving.
no setter
localRecvChannel → ChannelCore<T, Object>?
Fast path: resolve local channel if in same isolate.
no setterinherited
metricsId String?
final
mx MetricsRecorder
no setterinherited
recvDisconnected bool
Whether the channel's receive side is disconnected.
no setterinherited
remoteConnection → FlowControlledRemoteConnection<T>?
no setterinherited
remotePort → PlatformPort
The PlatformPort to communicate with the channel.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
closeRemote() → void
Closes the remote connection if active.
inherited
mapBroadcast<R>(R f(T)) Stream<R>

Available on KeepAliveReceiver<T>, provided by the StreamReceiverX extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recv() Future<RecvResult<T>>
inherited
recvAll({Duration idle = Duration.zero, int? max}) Future<Iterable<T>>

Available on Receiver<T>, provided by the ReceiverDrainX extension

Receive multiple values with batching and idle timeout.
recvCancelable() → (Future<RecvResult<T>>, void Function())
inherited
recvTimeout(Duration d) Future<RecvResult<T>>

Available on Receiver<T>, provided by the ReceiverTimeoutX extension

Receive a value with a timeout to prevent indefinite waiting.
stream() Stream<T>
toBroadcastStream({bool waitForListeners = false, bool stopWhenNoListeners = true, bool closeReceiverOnDone = false, bool sync = false}) Stream<T>

Available on KeepAliveReceiver<T>, provided by the StreamReceiverX extension

Convert a channel receiver to a broadcast stream for multiple listeners.
toString() String
A string representation of this object.
inherited
toTransferable() Map<String, Object?>
Converts this receiver to a platform-agnostic transferable representation.
inherited
tryRecv() RecvResult<T>
inherited
tryRecvAll({int? max}) Iterable<T>

Available on Receiver<T>, provided by the ReceiverDrainX extension

Drain all immediately available values without waiting.

Operators

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