Another one
modified: frida_core/src/linux_tun.rs
This commit is contained in:
parent
04660213e3
commit
f3c32f6386
@ -32,12 +32,14 @@ pub struct DeviceReader {
|
|||||||
|
|
||||||
impl DeviceWriter {
|
impl DeviceWriter {
|
||||||
pub async fn write(&self, buf: &Vec<u8>) -> Result<usize, Box<dyn Error>> {
|
pub async fn write(&self, buf: &Vec<u8>) -> Result<usize, Box<dyn Error>> {
|
||||||
self.writer.send_all(buf).await
|
self.writer.send_all(buf).await?;
|
||||||
|
Ok(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DeviceReader {
|
impl DeviceReader {
|
||||||
pub async fn read(&self, buf: &mut Vec<u8>) -> Result<usize, Box<dyn Error>> {
|
pub async fn read(&self, buf: &mut Vec<u8>) -> Result<usize, Box<dyn Error>> {
|
||||||
self.reader.recv(buf).await
|
let n = self.reader.recv(buf).await?;
|
||||||
|
Ok(n)
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user