UDP virtual interface skeleton

This commit is contained in:
Aram 🍐 2021-10-20 18:06:35 -04:00
parent cc91cce169
commit fb50ee7113
6 changed files with 203 additions and 35 deletions

View file

@ -266,7 +266,14 @@ impl VirtualInterfacePoll for TcpVirtualInterface {
break;
}
tokio::time::sleep(Duration::from_millis(1)).await;
match virtual_interface.poll_delay(&socket_set, loop_start) {
Some(smoltcp::time::Duration::ZERO) => {
continue;
}
_ => {
tokio::time::sleep(Duration::from_millis(1)).await;
}
}
}
trace!("[{}] Virtual interface task terminated", self.virtual_port);
self.abort.store(true, Ordering::Relaxed);