aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mumd/src/main.rs')
-rw-r--r--mumd/src/main.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/mumd/src/main.rs b/mumd/src/main.rs
index 37ff0dd..b83299f 100644
--- a/mumd/src/main.rs
+++ b/mumd/src/main.rs
@@ -36,11 +36,12 @@ async fn main() {
let (connection_info_sender, connection_info_receiver) =
watch::channel::<Option<ConnectionInfo>>(None);
let (response_sender, response_receiver) = mpsc::unbounded_channel();
+ let (ping_request_sender, ping_request_receiver) = mpsc::unbounded_channel();
let state = State::new(packet_sender, connection_info_sender);
let state = Arc::new(Mutex::new(state));
- let (_, _, _, e) = join!(
+ let (_, _, _, e, _) = join!(
network::tcp::handle(
Arc::clone(&state),
connection_info_receiver.clone(),
@@ -53,11 +54,17 @@ async fn main() {
connection_info_receiver.clone(),
crypt_state_receiver,
),
- command::handle(state, command_receiver, response_sender),
+ command::handle(
+ state,
+ command_receiver,
+ response_sender,
+ ping_request_sender,
+ ),
spawn_blocking(move || {
// IpcSender is blocking
receive_oneshot_commands(command_sender);
}),
+ network::udp::handle_pings(ping_request_receiver),
);
e.unwrap();
}