mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
refator: copy cli into mono
This commit is contained in:
parent
66ae3c296e
commit
80f6b87991
63 changed files with 244 additions and 34 deletions
12
crates/lib/examples/teamfortress2.rs
Normal file
12
crates/lib/examples/teamfortress2.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use gamedig::games::teamfortress2;
|
||||
|
||||
fn main() {
|
||||
let response = teamfortress2::query(&"127.0.0.1".parse().unwrap(), None);
|
||||
// or Some(27015), None is the default protocol port (which is 27015)
|
||||
|
||||
match response {
|
||||
// Result type, must check what it is...
|
||||
Err(error) => println!("Couldn't query, error: {}", error),
|
||||
Ok(r) => println!("{:#?}", r),
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue