refactor cliprdr, not tested on windows yet

This commit is contained in:
rustdesk
2022-02-15 14:46:08 +08:00
parent e407ba3a33
commit 933969d1fe
15 changed files with 114 additions and 49 deletions

View File

@@ -139,6 +139,8 @@ pub struct PeerConfig {
pub disable_audio: bool,
#[serde(default)]
pub disable_clipboard: bool,
#[serde(default)]
pub enable_file_transfer: bool,
// the other scalar value must before this
#[serde(default)]

View File

@@ -84,7 +84,7 @@ impl FramedSocket {
let _ = match self {
Self::Direct(f) => match addr {
TargetAddr::Ip(addr) => f.send((send_data, addr)).await?,
_ => unreachable!(),
_ => {}
},
Self::ProxySocks(f) => f.send((send_data, addr)).await?,
};
@@ -103,7 +103,7 @@ impl FramedSocket {
let _ = match self {
Self::Direct(f) => match addr {
TargetAddr::Ip(addr) => f.send((Bytes::from(msg), addr)).await?,
_ => unreachable!(),
_ => {}
},
Self::ProxySocks(f) => f.send((Bytes::from(msg), addr)).await?,
};