|
|
@ -38,9 +38,7 @@ pub fn start_tcp_server(
|
|
|
|
let address = SocketAddr::new(ip, port);
|
|
|
|
let address = SocketAddr::new(ip, port);
|
|
|
|
let address_string = address.to_string();
|
|
|
|
let address_string = address.to_string();
|
|
|
|
|
|
|
|
|
|
|
|
let join_handle = tokio::task::Builder::new()
|
|
|
|
let join_handle = tokio::task::spawn(async move {
|
|
|
|
.name("mediarepo_tcp::listen")
|
|
|
|
|
|
|
|
.spawn(async move {
|
|
|
|
|
|
|
|
get_builder::<EncryptedListener<TcpListener>>(address)
|
|
|
|
get_builder::<EncryptedListener<TcpListener>>(address)
|
|
|
|
.insert::<SubsystemKey>(subsystem)
|
|
|
|
.insert::<SubsystemKey>(subsystem)
|
|
|
|
.insert_all(shared_data)
|
|
|
|
.insert_all(shared_data)
|
|
|
@ -66,9 +64,7 @@ pub fn create_unix_socket(
|
|
|
|
if path.exists() {
|
|
|
|
if path.exists() {
|
|
|
|
fs::remove_file(&path)?;
|
|
|
|
fs::remove_file(&path)?;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let join_handle = tokio::task::Builder::new()
|
|
|
|
let join_handle = tokio::task::spawn(async move {
|
|
|
|
.name("mediarepo_unix_socket::listen")
|
|
|
|
|
|
|
|
.spawn(async move {
|
|
|
|
|
|
|
|
get_builder::<UnixListener>(path)
|
|
|
|
get_builder::<UnixListener>(path)
|
|
|
|
.insert::<SubsystemKey>(subsystem)
|
|
|
|
.insert::<SubsystemKey>(subsystem)
|
|
|
|
.insert_all(shared_data)
|
|
|
|
.insert_all(shared_data)
|
|
|
|