try out muliticast on multiple interface

This commit is contained in:
open-trade
2022-01-14 18:16:00 +08:00
parent 07aa0898c5
commit 0a2bc1cf8a
5 changed files with 322 additions and 106 deletions

View File

@@ -1,4 +1,6 @@
use crate::ipc::{ConnectionTmpl, Data};
#[cfg(target_os = "macos")]
use crate::ipc::ConnectionTmpl;
use crate::ipc::Data;
use connection::{ConnInner, Connection};
use hbb_common::{
allow_err,
@@ -15,14 +17,14 @@ use hbb_common::{
};
#[cfg(target_os = "macos")]
use notify::{watcher, RecursiveMode, Watcher};
#[cfg(target_os = "macos")]
use parity_tokio_ipc::ConnectionClient;
use service::{GenericService, Service, ServiceTmpl, Subscriber};
use std::path::PathBuf;
use std::time::Duration;
use std::{
collections::HashMap,
net::SocketAddr,
sync::{Arc, Mutex, RwLock, Weak},
time::Duration,
};
mod audio_service;
@@ -261,7 +263,7 @@ pub fn check_zombie() {
}
}
drop(lock);
std::thread::sleep(std::time::Duration::from_millis(100));
std::thread::sleep(Duration::from_millis(100));
});
}
@@ -407,7 +409,7 @@ async fn sync_config_to_user(conn: &mut ConnectionTmpl<ConnectionClient>) -> Res
#[cfg(target_os = "macos")]
async fn sync_config_to_root(
conn: &mut ConnectionTmpl<ConnectionClient>,
from: PathBuf,
from: std::path::PathBuf,
) -> ResultType<()> {
allow_err!(
conn.send(&Data::SyncConfigToRootReq {