mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
tokio1, windows not test yet
This commit is contained in:
@@ -34,7 +34,7 @@ pub fn new() -> GenericService {
|
||||
#[cfg(target_os = "linux")]
|
||||
mod pa_impl {
|
||||
use super::*;
|
||||
#[tokio::main(basic_scheduler)]
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
pub async fn run(sp: GenericService) -> ResultType<()> {
|
||||
if let Ok(mut stream) = crate::ipc::connect(1000, "_pa").await {
|
||||
let mut encoder =
|
||||
|
||||
@@ -5,11 +5,10 @@ use crate::ipc;
|
||||
use hbb_common::{
|
||||
config::Config,
|
||||
fs,
|
||||
futures::SinkExt,
|
||||
futures::{SinkExt, StreamExt},
|
||||
sleep, timeout,
|
||||
tokio::{
|
||||
net::TcpStream,
|
||||
stream::StreamExt,
|
||||
sync::mpsc,
|
||||
time::{self, Duration, Instant, Interval},
|
||||
},
|
||||
|
||||
@@ -518,7 +518,7 @@ fn handle_key_(evt: &KeyEvent) {
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::main(basic_scheduler)]
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
async fn send_sas() -> ResultType<()> {
|
||||
let mut stream = crate::ipc::connect(1000, crate::POSTFIX_SERVICE).await?;
|
||||
timeout(1000, stream.send(&crate::ipc::Data::SAS)).await??;
|
||||
|
||||
Reference in New Issue
Block a user