mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +00:00
Added support for Left 4 Dead and Left 4 Dead 2
This commit is contained in:
parent
046544ea27
commit
d477bbb178
7 changed files with 196 additions and 0 deletions
10
examples/l4d.rs
Normal file
10
examples/l4d.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
use gamedig::games::l4d;
|
||||
|
||||
fn main() {
|
||||
let response = l4d::query("207.246.72.170", Some(26999));
|
||||
match response {
|
||||
Err(error) => println!("Couldn't query, error: {error}"),
|
||||
Ok(r) => println!("{:?}", r)
|
||||
}
|
||||
}
|
||||
10
examples/l4d2.rs
Normal file
10
examples/l4d2.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
use gamedig::games::l4d2;
|
||||
|
||||
fn main() {
|
||||
let response = l4d2::query("74.91.124.246", None);
|
||||
match response {
|
||||
Err(error) => println!("Couldn't query, error: {error}"),
|
||||
Ok(r) => println!("{:?}", r)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue