InMemoryBus class

Routes Frames between InMemoryTransport nodes registered on this bus.

Used in engine tests to simulate a local network without any sockets. Two (or more) Passnote instances backed by the same bus will converge exactly as they would over a real LAN transport.

Constructors

InMemoryBus()

Properties

hashCode → int
The hash code for this object.
no setterinherited
paused ↔ bool
When true, routed frames are held instead of delivered — a simple way for a test to simulate a network outage. Setting it back to false delivers everything that was held, in order.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(InMemoryTransport transport) → void
Registers transport on this bus and notifies all existing nodes of the new peer (and vice-versa).
route(NodeId from, NodeId to, Frame frame) → void
Delivers frame from from to the single addressed node to.
toString() → String
A string representation of this object.
inherited
unregister(NodeId id) → void
Removes id from the bus and notifies all remaining nodes.

Operators

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