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<()> {
|
||||
self.inner.send(bytes::Bytes::from(data)).await?;
|
||||
pub async fn send_raw(&mut self, data: Bytes) -> ResultType<()> {
|
||||
self.inner.send(data).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -1364,7 +1364,7 @@ async fn start_ipc(
|
||||
data,
|
||||
compressed}) = data {
|
||||
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 {
|
||||
stream.send(&data).await?;
|
||||
}
|
||||
|
@ -590,7 +590,7 @@ async fn start_pa() {
|
||||
} else {
|
||||
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);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user