Connection With Omikron

This commit is contained in:
Alex Emmet 2026-01-05 02:15:55 +01:00
commit 0122d5b342
10 changed files with 426 additions and 217 deletions

View file

@ -464,10 +464,19 @@ pub async fn start_omikron_handler(connection: Arc<OmikronConnection>) {
conn_clone.handle_message(text.to_string()).await;
});
}
Message::Ping(_) => {
let pong_response = crate::data::communication::CommunicationValue::new(
crate::data::communication::CommunicationType::pong,
);
let conn_clone = connection.clone();
tokio::spawn(async move {
conn_clone.send_message(&pong_response).await;
});
}
Message::Close(_) => {
break;
}
// Other message types like Binary, Ping, Pong are ignored.
// Other message types like Binary, Pong are ignored.
_ => {}
}
}