Better protocol parameters and utils tests

This commit is contained in:
CosminPerRam 2022-10-17 11:11:40 +03:00
parent 3a83588802
commit 544ce897c5
4 changed files with 110 additions and 44 deletions

View file

@ -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)
})
}
}