concurrent read write loop working
relies on timeouts. Write to Networks doesn't work yet
This commit is contained in:
parent
6c1c806401
commit
4038d125db
7 changed files with 121 additions and 51 deletions
|
|
@ -50,6 +50,12 @@ impl TunInterface {
|
|||
buf[..len-4].copy_from_slice(&tmp_buf[4..len]);
|
||||
len-4
|
||||
}
|
||||
|
||||
#[throws]
|
||||
#[instrument]
|
||||
pub fn set_timeout(&self, timeout: Option<std::time::Duration>) {
|
||||
self.socket.set_read_timeout(timeout)?;
|
||||
}
|
||||
}
|
||||
|
||||
#[instrument]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue