Expand description
A byte link between two stacks in one process, with faults you can turn on.
The loopback transport this crate’s documentation has promised since it was written. Two full stacks talk through it with no sockets, no ports and no sleeping — which is what makes the behaviour the transaction machines exist for testable at all. A retransmission after a lost datagram takes 500 milliseconds of real time over a real socket and none at all over this.
The link does not read the clock. now is an argument, exactly as it is for
sipx_transport::timers::TimerQueue, so a test drives both from one virtual clock of its own
and a lost packet costs no wall time.
Faults are seeded. The same seed replays the same trace, so a failure found by fuzzing loss rates is a failure you can re-run. A link whose faults came from a thread RNG would produce bug reports nobody could reproduce.
Structs§
- Delivery
- A datagram that has arrived.
- Faults
- What the link does to the traffic crossing it.
- Link
- An in-process link between two stacks.
Enums§
- Side
- Which end of the link.