mirror of
https://github.com/arampoire/onetun.git
synced 2025-12-01 03:40:23 -05:00
UDP virtual interface skeleton
This commit is contained in:
parent
cc91cce169
commit
fb50ee7113
6 changed files with 203 additions and 35 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue