Skip to content

Commit

Permalink
socket: enable send/recvmmsg variants on unix only
Browse files Browse the repository at this point in the history
From a quick glance, Windows does not have the equivalent syscall in the
WinSock API.
  • Loading branch information
Tuetuopay committed Feb 8, 2024
1 parent 75eaa14 commit 338edb2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ impl Socket {
}

/// Receive multiple messages in a single call.
#[cfg(not(target_os = "redox"))]
#[cfg_attr(docsrs, doc(cfg(not(target_os = "redox"))))]
#[cfg(all(unix, not(target_os = "redox")))]
#[cfg_attr(docsrs, doc(cfg(all(unix, not(target_os = "redox")))))]
pub fn recv_multiple_from(
&self,
msgs: &mut [MaybeUninitSlice<'_>],
Expand Down Expand Up @@ -766,8 +766,8 @@ impl Socket {

/// Send multiple data to multiple peers listening on `addrs`. Return the amount of bytes
/// written for each message.
#[cfg(not(target_os = "redox"))]
#[cfg_attr(docsrs, doc(cfg(not(target_os = "redox"))))]
#[cfg(all(unix, not(target_os = "redox")))]
#[cfg_attr(docsrs, doc(cfg(all(unix, not(target_os = "redox")))))]
pub fn send_multiple_to(
&self,
msgs: &[IoSlice<'_>],
Expand Down

0 comments on commit 338edb2

Please sign in to comment.