mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Protocol] Add GameSpy 2 support. (#47)
* [Protocol] Add initial files * [Protocol] Add test to test the request * [Protocol] Add initial query response type * [Protocol] Parse teams * [Protocol] Add players parse and add nice macro * [Protocol] Add proper derives to structs * [Protocol] Change to get all informations from one request * [Protocol] Add Halo: CE support and update CHANGELOG.md * [Protocol] Remove a .clone usage * [Protocol] Add todo comment regarding code performance * [Protocol] Use iterator instead of index range
This commit is contained in:
parent
80637f2398
commit
26ad1f5d19
10 changed files with 250 additions and 7 deletions
8
src/games/haloce.rs
Normal file
8
src/games/haloce.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
use crate::protocols::gamespy;
|
||||
use crate::protocols::gamespy::two::Response;
|
||||
use crate::GDResult;
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
|
||||
pub fn query(address: &IpAddr, port: Option<u16>) -> GDResult<Response> {
|
||||
gamespy::two::query(&SocketAddr::new(*address, port.unwrap_or(2302)), None)
|
||||
}
|
||||
|
|
@ -48,6 +48,8 @@ pub mod dst;
|
|||
pub mod ffow;
|
||||
/// Garry's Mod
|
||||
pub mod gm;
|
||||
/// Halo: Combat Evolved
|
||||
pub mod haloce;
|
||||
/// Half-Life 2 Deathmatch
|
||||
pub mod hl2dm;
|
||||
/// Half-Life Deathmatch: Source
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue