Function netsim::spawn::new_namespace [−][src]
pub fn new_namespace<F, R>(func: F) -> SpawnComplete<R> where
F: FnOnce() -> R,
F: Send + 'static,
R: Send + 'static,
Run the function func
in its own network namespace on a separate thread. This namespace will
not have any network interfaces. You can create virtual interfaces using Tap
, or use one of
the other functions in the spawn
module which do this for you.