mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Protocol] Replace IpAddr with SocketAddr in protocols (#44)
* [Crate] Replace IpAddr with SocketAddr in protocols * [Crate] Remove usage of address.to_string in socket * [Crate] Update CHANGELOG.md
This commit is contained in:
parent
596d15df78
commit
e0830bdae5
70 changed files with 215 additions and 286 deletions
|
|
@ -1,9 +1,9 @@
|
|||
use std::net::IpAddr;
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
use crate::GDResult;
|
||||
use crate::protocols::quake;
|
||||
use crate::protocols::quake::Response;
|
||||
use crate::protocols::quake::two::Player;
|
||||
|
||||
pub fn query(address: &IpAddr, port: Option<u16>) -> GDResult<Response<Player>> {
|
||||
quake::three::query(address, port.unwrap_or(27960), None)
|
||||
quake::three::query(&SocketAddr::new(*address, port.unwrap_or(27960)), None)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue