mirror of
https://github.com/Tribufu/rust-gamedig
synced 2026-08-10 15:41:05 +00:00
[Protocol] Valve: support app and dedicated app id
This commit is contained in:
parent
fe46359e47
commit
150bc1762e
48 changed files with 259 additions and 179 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use std::collections::HashMap;
|
||||
use crate::GDResult;
|
||||
use crate::protocols::valve;
|
||||
use crate::protocols::valve::{Server, ServerPlayer, get_optional_extracted_data, SteamID};
|
||||
use crate::protocols::valve::{Server, ServerPlayer, get_optional_extracted_data, SteamApp};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct TheShipPlayer {
|
||||
|
|
@ -85,7 +85,7 @@ pub fn query(address: &str, port: Option<u16>) -> GDResult<Response> {
|
|||
let valve_response = valve::query(address, match port {
|
||||
None => 27015,
|
||||
Some(port) => port
|
||||
}, SteamID::TS.as_app(), None, None)?;
|
||||
}, SteamApp::TS.as_engine(), None, None)?;
|
||||
|
||||
Ok(Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue