rust-gamedig/src/games/vr.rs
Tom 3f654e0dfd
[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.
2023-05-29 11:10:21 +03:00

17 lines
403 B
Rust

use std::net::IpAddr;
use crate::{
protocols::valve::{self, game, SteamApp},
GDResult,
};
pub fn query(address: &IpAddr, port: Option<u16>) -> GDResult<game::Response> {
let valve_response = valve::query(
address,
port.unwrap_or(27016),
SteamApp::VR.as_engine(),
None,
None,
)?;
Ok(game::Response::new_from_valve_response(valve_response))
}