Multiplexer class abstract

Represents a stream multiplexer that can create and manage multiple logical streams over a single connection.

Implementers

Constructors

Multiplexer.new()

Properties

canCreateStream bool
Returns true if we can create more streams
no setter
hashCode int
The hash code for this object.
no setterinherited
incomingStreams Stream<P2PStream>
Event stream for new inbound streams
no setter
isClosed bool
Returns true if the multiplexer is closed
no setter
maxStreams int
The maximum number of concurrent streams allowed
no setter
numStreams int
The current number of active streams
no setter
protocolId String
The protocol ID for this multiplexer (e.g., '/yamux/1.0.0')
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
streams Future<List<P2PStream>>
Returns all active streams
no setter

Methods

acceptStream() Future<P2PStream>
Accepts an inbound stream
close() Future<void>
Closes the multiplexer and all its streams
newConnOnTransport(TransportConn secureConnection, bool isServer, PeerScope scope) Future<MuxedConn>
Establishes a new multiplexed connection over an existing transport connection.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeStreamHandler() → void
Removes the stream handler
setStreamHandler(Future<void> handler(P2PStream stream)) → void
Sets the stream handler for accepting new streams
toString() String
A string representation of this object.
inherited

Operators

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