How many messages are waiting in the buffer.
Connects every rung, so a send can be tried against each in turn.
A rung that will not connect is left in the ladder: it may come back, and a send simply falls through it until it does.
Replays the buffer over the rungs, oldest message first, and reports how many went out.
Waits for the next message from any rung that listens, whichever delivers first.
Throws if no connected rung listens: none was added, the ladder is not connected, or every listening link has ended. The ladder does one thing at a time, so a send waits behind a receive in progress; a node that listens and reports waits with a limit and sends between waits.
OptionaltimeoutMs: number | null
how long to wait before rejecting; a message that arrives later waits for the next receive.
Adds a rung, which is tried after the rungs already added.
Add the cheapest, most-preferred link first and the costliest fallback
last, because a send takes the first rung that accepts it. The transport
is consumed. A transport that delivers is subscribed and listened on; a
host transport without recv is an uplink the ladder never listens on.
Sends a payload, falling through the rungs and buffering if none take it.
Buffering is a success, not a failure: it is what the ladder exists to do.
Subscribes every rung that listens to a topic.
The filter is kept for the life of the ladder: a rung that is down when it
is placed receives it when it next connects, so subscribing before
connect is fine and never fails for want of a link.
Adds a rung that only sends, tried after the rungs already added.
The ladder sends over it in its turn but never subscribes it or listens on it, whatever the transport could do: a satellite messenger, a LoRa uplink, or any link a node reports over but takes no commands from. The transport is consumed.
An ordered set of transports backed by an offline buffer.