Struct netsim::device::RouterV4Builder
[−]
[src]
pub struct RouterV4Builder { /* fields omitted */ }
Builder for creating a RouterV4
.
Methods
impl RouterV4Builder
[src]
fn new(ipv4_addr: Ipv4Addr) -> RouterV4Builder
[src]
Start creating a new RouterV4
with the given IP address.
fn connect(self, plug: Ipv4Plug, routes: Vec<RouteV4>) -> RouterV4Builder
[src]
Connect another client to the router. routes
indicates what packets from other clients
should be routed down this connection. When determining where to route a packet, the
RouterV4
will examine each connection and set of routes in the order they were added
using this function.
fn build(self) -> RouterV4
[src]
Build the RouterV4
fn spawn(self, handle: &Handle)
[src]
Build the RouterV4
, spawning it directly onto the tokio event loop.