mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
codec thread count depending on cpu condition
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
12
src/ipc.rs
12
src/ipc.rs
@@ -229,6 +229,8 @@ pub enum Data {
|
||||
#[cfg(all(feature = "flutter", feature = "plugin_framework"))]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
Plugin(Plugin),
|
||||
#[cfg(windows)]
|
||||
SyncWinCpuUsage(Option<f64>),
|
||||
}
|
||||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
@@ -452,6 +454,16 @@ async fn handle(data: Data, stream: &mut Connection) {
|
||||
.await
|
||||
);
|
||||
}
|
||||
#[cfg(windows)]
|
||||
Data::SyncWinCpuUsage(None) => {
|
||||
allow_err!(
|
||||
stream
|
||||
.send(&Data::SyncWinCpuUsage(
|
||||
hbb_common::platform::windows::cpu_uage_one_minute()
|
||||
))
|
||||
.await
|
||||
);
|
||||
}
|
||||
Data::TestRendezvousServer => {
|
||||
crate::test_rendezvous_server();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user