Added socket timeout capability and reduced PACKET_SIZE to 1400 as specified from protocol

This commit is contained in:
CosminPerRam 2022-11-15 21:07:15 +02:00
parent d3b71fccf6
commit caa7329a68
21 changed files with 125 additions and 49 deletions

View file

@ -54,10 +54,10 @@ pub fn query(address: &str, port: Option<u16>) -> GDResult<Response> {
let valve_response = valve::query(address, match port {
None => 27015,
Some(port) => port
}, SteamID::CSGO.app(), Some(GatheringSettings {
}, SteamID::CSGO.as_app(), Some(GatheringSettings {
players: true,
rules: false // cause csgo doesnt reply with rules anymore
}))?;
}), None)?;
Ok(Response::new_from_valve_response(valve_response))
}