modify argument of ConnectionTmpl::send_raw()
This commit is contained in:
parent
9ab955bb8e
commit
e811d5f18b
@ -456,8 +456,8 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn send_raw(&mut self, data: Vec<u8>) -> ResultType<()> {
|
pub async fn send_raw(&mut self, data: Bytes) -> ResultType<()> {
|
||||||
self.inner.send(bytes::Bytes::from(data)).await?;
|
self.inner.send(data).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1364,7 +1364,7 @@ async fn start_ipc(
|
|||||||
data,
|
data,
|
||||||
compressed}) = data {
|
compressed}) = data {
|
||||||
stream.send(&Data::FS(ipc::FS::WriteBlock{id, file_num, data: Bytes::new(), compressed})).await?;
|
stream.send(&Data::FS(ipc::FS::WriteBlock{id, file_num, data: Bytes::new(), compressed})).await?;
|
||||||
stream.send_raw(data.into()).await?;
|
stream.send_raw(data).await?;
|
||||||
} else {
|
} else {
|
||||||
stream.send(&data).await?;
|
stream.send(&data).await?;
|
||||||
}
|
}
|
||||||
|
@ -590,7 +590,7 @@ async fn start_pa() {
|
|||||||
} else {
|
} else {
|
||||||
buf.clone()
|
buf.clone()
|
||||||
};
|
};
|
||||||
if let Err(err) = stream.send_raw(out).await {
|
if let Err(err) = stream.send_raw(out.into()).await {
|
||||||
log::error!("Failed to send audio data:{}", err);
|
log::error!("Failed to send audio data:{}", err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user