pub trait VortexNetwork {
// Required methods
fn send(&mut self, to: NodeId, payload: Vec<u8>) -> Result<()>;
fn recv(&mut self) -> Option<(NodeId, Vec<u8>)>;
// Provided method
fn broadcast(&mut self, nodes: &[NodeId], payload: Vec<u8>) -> Result<()> { ... }
}Expand description
Network I/O boundary trait.
In production: real TCP/UDP sockets.
In simulation: SimNetwork with configurable latency, drops, partitions.