Expand description
Telemetry client for F1 game by Codemasters
§Example
use f1_telemetry_client::{Telemetry, packet::Packet};
use async_std::task;
fn main() {
task::block_on(async {
let telemetry = Telemetry::new("127.0.0.1", 20777).await.unwrap();
loop {
match telemetry.next().await {
Ok(packet) => {
match packet {
Packet::F12020(result) => {
println!("Result {:?}", result);
}
_ => unimplemented!(),
}
}
Err(e) => {
eprintln!("Error {}", e)
}
}
}
})
}