diff options
| author | Steven Fackler <sfackler@gmail.com> | 2016-04-20 21:42:19 -0700 |
|---|---|---|
| committer | Steven Fackler <sfackler@gmail.com> | 2016-04-20 21:42:19 -0700 |
| commit | c6480e8b6b13401030c52f3c2b4fcc4e80c14481 (patch) | |
| tree | 92c102ee0566a100d008eff426235519e287b288 /src/libstd/sys | |
| parent | a0c325980367d5ee981145e31c70585acee40cd2 (diff) | |
| download | rust-c6480e8b6b13401030c52f3c2b4fcc4e80c14481.tar.gz rust-c6480e8b6b13401030c52f3c2b4fcc4e80c14481.zip | |
Remove IPV6_V6ONLY functionality
These settings can only be adjusted before bind time, which doesn't make sense in the current set of functionality. These methods are stable, but haven't hit a stable release yet. Closes #33052 [breaking-change]
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/common/net.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs index d5d967114c4..54b9b466c42 100644 --- a/src/libstd/sys/common/net.rs +++ b/src/libstd/sys/common/net.rs @@ -247,15 +247,6 @@ impl TcpStream { Ok(raw as u32) } - pub fn set_only_v6(&self, only_v6: bool) -> io::Result<()> { - setsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_V6ONLY, only_v6 as c_int) - } - - pub fn only_v6(&self) -> io::Result<bool> { - let raw: c_int = getsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_V6ONLY)?; - Ok(raw != 0) - } - pub fn take_error(&self) -> io::Result<Option<io::Error>> { self.inner.take_error() } @@ -544,15 +535,6 @@ impl UdpSocket { Ok(raw as u32) } - pub fn set_only_v6(&self, only_v6: bool) -> io::Result<()> { - setsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_V6ONLY, only_v6 as c_int) - } - - pub fn only_v6(&self) -> io::Result<bool> { - let raw: c_int = getsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_V6ONLY)?; - Ok(raw != 0) - } - pub fn take_error(&self) -> io::Result<Option<io::Error>> { self.inner.take_error() } |
