websocket

This commit is contained in:
2024-10-18 18:20:44 +02:00
parent ea88c755b5
commit 5e651b382d
19 changed files with 654 additions and 131 deletions

View File

@@ -0,0 +1,29 @@
pub struct Client {
// whatever we need
}
impl Client {
pub fn new() -> Self {
Self {
// websocket receiver
// websocket sender
// simconnect client handle
}
}
pub fn run() -> Result<(), anyhow::Error> {
loop {
tokio::select! {
// we can either get a message from the websocket to pass to simconnect
// we can get a message from simconnect to pass to the websocket
// or we get a quit event from the event channel
}
}
}
}
pub async fn start() -> Result<(), anyhow::Error> {
Client::new().run().await?
}