avoid using unavailable udp_socket optimizations on ios targets
This commit is contained in:
committed by
Michael Vines
parent
60fe1d00e8
commit
9079de825b
@ -372,13 +372,13 @@ pub fn is_host_port(string: String) -> Result<(), String> {
|
||||
parse_host_port(&string).map(|_| ())
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[cfg(any(windows, target_os = "ios"))]
|
||||
fn udp_socket(_reuseaddr: bool) -> io::Result<Socket> {
|
||||
let sock = Socket::new(Domain::IPV4, Type::DGRAM, None)?;
|
||||
Ok(sock)
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
#[cfg(not(any(windows, target_os = "ios")))]
|
||||
fn udp_socket(reuseaddr: bool) -> io::Result<Socket> {
|
||||
use nix::sys::socket::setsockopt;
|
||||
use nix::sys::socket::sockopt::{ReuseAddr, ReusePort};
|
||||
|
Reference in New Issue
Block a user