Files
avam/avam-client/src/simconnect.rs
2024-10-18 18:20:44 +02:00

30 lines
672 B
Rust

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?
}