mirror of
https://github.com/Tribufu/rust-gamedig
synced 2026-08-09 15:11:07 +00:00
[Protocol] Enable the use of Ipv6 addresses (#41)
Replace usages of Ipv4Addr with IpAddr which allows the use of either Ipv4 or Ipv6. This patch essentially consists of running: "sed -i 's/Ipv4Addr/IpAddr/g' src/**/*.rs examples/*" and fixing the errors.
This commit is contained in:
parent
e620398615
commit
3f654e0dfd
60 changed files with 155 additions and 162 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use std::net::Ipv4Addr;
|
||||
use std::net::IpAddr;
|
||||
use crate::{
|
||||
protocols::valve::{self, get_optional_extracted_data, Server, ServerPlayer, SteamApp},
|
||||
GDResult,
|
||||
|
|
@ -94,7 +94,7 @@ impl Response {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn query(address: &Ipv4Addr, port: Option<u16>) -> GDResult<Response> {
|
||||
pub fn query(address: &IpAddr, port: Option<u16>) -> GDResult<Response> {
|
||||
let valve_response = valve::query(
|
||||
address,
|
||||
port.unwrap_or(27015),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue