30 lines
672 B
Rust
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?
|
|
}
|