diff options
Diffstat (limited to 'src/sys/shell')
-rw-r--r-- | src/sys/shell/tcp.rs | 12 | ||||
-rw-r--r-- | src/sys/shell/udp.rs | 4 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/sys/shell/tcp.rs b/src/sys/shell/tcp.rs index 2017bda..0ed225f 100644 --- a/src/sys/shell/tcp.rs +++ b/src/sys/shell/tcp.rs @@ -1,7 +1,7 @@ +use crate::net::TcpKeepalive; use std::io; use std::net::{self, SocketAddr}; use std::time::Duration; -use crate::net::TcpKeepalive; pub(crate) type TcpSocket = i32; @@ -79,24 +79,18 @@ pub(crate) fn get_keepalive(_: TcpSocket) -> io::Result<bool> { os_required!(); } -#[cfg(any( - target_os = "linux", - target_os = "macos", - target_os = "ios", - target_os = "freebsd", - target_os = "netbsd", - target_os = "windows", -))] pub(crate) fn set_keepalive_params(_: TcpSocket, _: TcpKeepalive) -> io::Result<()> { os_required!() } #[cfg(any( + target_os = "android", target_os = "linux", target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "netbsd", + target_os = "solaris", ))] pub(crate) fn get_keepalive_time(_: TcpSocket) -> io::Result<Option<Duration>> { os_required!() diff --git a/src/sys/shell/udp.rs b/src/sys/shell/udp.rs index 3ff1625..48ccac7 100644 --- a/src/sys/shell/udp.rs +++ b/src/sys/shell/udp.rs @@ -4,3 +4,7 @@ use std::net::{self, SocketAddr}; pub fn bind(_: SocketAddr) -> io::Result<net::UdpSocket> { os_required!() } + +pub(crate) fn only_v6(_: &net::UdpSocket) -> io::Result<bool> { + os_required!() +} |