update bytes(protobuf types) mapping, from Vec<u8> to bytes:Byte

issues:958
This commit is contained in:
tom
2022-07-16 00:45:23 +08:00
parent c6c5d2cb98
commit efa6b5972d
13 changed files with 34 additions and 25 deletions

View File

@@ -20,6 +20,8 @@ use std::{
sync::{Arc, Mutex, RwLock, Weak},
time::Duration,
};
use bytes::Bytes;
pub mod audio_service;
cfg_if::cfg_if! {
if #[cfg(not(any(target_os = "android", target_os = "ios")))] {
@@ -126,13 +128,13 @@ pub async fn create_tcp_connection(
id: sign::sign(
&IdPk {
id: Config::get_id(),
pk: our_pk_b.0.to_vec(),
pk: Bytes::from(our_pk_b.0.to_vec()),
..Default::default()
}
.write_to_bytes()
.unwrap_or_default(),
&sk,
),
).into(),
..Default::default()
});
timeout(CONNECT_TIMEOUT, stream.send(&msg_out)).await??;