mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +00:00
Better protocol parameters and utils tests
This commit is contained in:
parent
3a83588802
commit
544ce897c5
4 changed files with 110 additions and 44 deletions
|
|
@ -1,13 +1,13 @@
|
|||
use crate::errors::GDError;
|
||||
use crate::protocols::valve::{Response, ValveProtocol};
|
||||
use crate::valve::{Response, ValveProtocol, App};
|
||||
|
||||
pub struct TF2;
|
||||
|
||||
impl TF2 {
|
||||
pub fn query(address: &str, port: Option<u16>) -> Result<Response, GDError> {
|
||||
ValveProtocol::query(address, match port {
|
||||
ValveProtocol::query(App::TF2, address, match port {
|
||||
None => 27015,
|
||||
Some(port) => port
|
||||
}, false)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue