diff --git a/src/transport/udp/io.rs b/src/transport/udp/io.rs index 979f5af..efde04e 100644 --- a/src/transport/udp/io.rs +++ b/src/transport/udp/io.rs @@ -800,7 +800,7 @@ pub use platform::{AsyncUdpSocket, UdpRawSocket}; /// /// Gated to Linux/macOS: the rest of `io.rs` compiles more broadly /// (Windows uses `tokio::net::UdpSocket`), but the connected fast path -/// is libc-syscall + `darwin_sockopts` specific. +/// is libc-syscall + `sockopts_macos` specific. #[cfg(any(target_os = "linux", target_os = "macos"))] mod connected { // The connected-UDP fast path is infra-ready but not yet wired into @@ -873,7 +873,7 @@ mod connected { set_sockopt_int(raw, libc::SOL_SOCKET, libc::SO_REUSEPORT, 1)?; #[cfg(target_os = "macos")] - crate::transport::udp::darwin_sockopts::apply_udp_socket_tuning(raw, "connected-udp-peer"); + crate::transport::udp::sockopts_macos::apply_udp_socket_tuning(raw, "connected-udp-peer"); // Buffer sizes — try the FORCE variants first (succeed if we // have CAP_NET_ADMIN), then fall back to the ceiling-clamped diff --git a/src/transport/udp/mod.rs b/src/transport/udp/mod.rs index 1d8a64e..d7a4fbe 100644 --- a/src/transport/udp/mod.rs +++ b/src/transport/udp/mod.rs @@ -6,9 +6,9 @@ use super::{ DiscoveredPeer, PacketTx, ReceivedPacket, Transport, TransportAddr, TransportError, TransportId, TransportState, TransportType, }; -#[cfg(target_os = "macos")] -pub(crate) mod darwin_sockopts; pub(crate) mod io; +#[cfg(target_os = "macos")] +pub(crate) mod sockopts_macos; #[cfg(any(target_os = "linux", target_os = "macos"))] pub(crate) use io::open_connected_fd; mod stats; diff --git a/src/transport/udp/darwin_sockopts.rs b/src/transport/udp/sockopts_macos.rs similarity index 96% rename from src/transport/udp/darwin_sockopts.rs rename to src/transport/udp/sockopts_macos.rs index c54fc71..7f98cee 100644 --- a/src/transport/udp/darwin_sockopts.rs +++ b/src/transport/udp/sockopts_macos.rs @@ -1,6 +1,5 @@ -// Applied inside `io::open_connected_fd` (dormant in this PR; see -// `io.rs`). Linux toolchain only checks gates — keep the module -// visible on Linux so clippy doesn't lose track. +// Applied inside `io::open_connected_fd` (see `io.rs`), dormant until +// the connected-UDP fast path is wired into dispatch — hence the allow. #![allow(dead_code)] //! Darwin UDP socket tuning. @@ -10,8 +9,6 @@ //! service type is the one low-cost Darwin hint that can change how the //! socket is queued by the host networking stack and Wi-Fi WMM. -#![cfg(target_os = "macos")] - use std::io; use std::os::fd::RawFd; use std::sync::OnceLock;