websocket
This commit is contained in:
29
avam-client/src/simconnect.rs
Normal file
29
avam-client/src/simconnect.rs
Normal 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?
|
||||
}
|
Reference in New Issue
Block a user