diff options
Diffstat (limited to 'src/net/udp.rs')
-rw-r--r-- | src/net/udp.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net/udp.rs b/src/net/udp.rs index 436b4cc..c5c3ba9 100644 --- a/src/net/udp.rs +++ b/src/net/udp.rs @@ -511,6 +511,12 @@ impl UdpSocket { self.inner.leave_multicast_v6(multiaddr, interface) } + /// Get the value of the `IPV6_V6ONLY` option on this socket. + #[allow(clippy::trivially_copy_pass_by_ref)] + pub fn only_v6(&self) -> io::Result<bool> { + sys::udp::only_v6(&self.inner) + } + /// Get the value of the `SO_ERROR` option on this socket. /// /// This will retrieve the stored error in the underlying socket, clearing |