File tree 3 files changed +0
-64
lines changed
3 files changed +0
-64
lines changed Original file line number Diff line number Diff line change @@ -221,29 +221,6 @@ impl TcpStream {
221
221
self . 0 . ttl ( )
222
222
}
223
223
224
- /// Sets the value for the `IPV6_V6ONLY` option on this socket.
225
- ///
226
- /// If this is set to `true` then the socket is restricted to sending and
227
- /// receiving IPv6 packets only. If this is the case, an IPv4 and an IPv6
228
- /// application can each bind the same port at the same time.
229
- ///
230
- /// If this is set to `false` then the socket can be used to send and
231
- /// receive packets from an IPv4-mapped IPv6 address.
232
- #[ stable( feature = "net2_mutators" , since = "1.9.0" ) ]
233
- pub fn set_only_v6 ( & self , only_v6 : bool ) -> io:: Result < ( ) > {
234
- self . 0 . set_only_v6 ( only_v6)
235
- }
236
-
237
- /// Gets the value of the `IPV6_V6ONLY` option for this socket.
238
- ///
239
- /// For more information about this option, see [`set_only_v6`][link].
240
- ///
241
- /// [link]: #method.set_only_v6
242
- #[ stable( feature = "net2_mutators" , since = "1.9.0" ) ]
243
- pub fn only_v6 ( & self ) -> io:: Result < bool > {
244
- self . 0 . only_v6 ( )
245
- }
246
-
247
224
/// Get the value of the `SO_ERROR` option on this socket.
248
225
///
249
226
/// This will retrieve the stored error in the underlying socket, clearing
Original file line number Diff line number Diff line change @@ -243,29 +243,6 @@ impl UdpSocket {
243
243
self . 0 . ttl ( )
244
244
}
245
245
246
- /// Sets the value for the `IPV6_V6ONLY` option on this socket.
247
- ///
248
- /// If this is set to `true` then the socket is restricted to sending and
249
- /// receiving IPv6 packets only. If this is the case, an IPv4 and an IPv6
250
- /// application can each bind the same port at the same time.
251
- ///
252
- /// If this is set to `false` then the socket can be used to send and
253
- /// receive packets from an IPv4-mapped IPv6 address.
254
- #[ stable( feature = "net2_mutators" , since = "1.9.0" ) ]
255
- pub fn set_only_v6 ( & self , only_v6 : bool ) -> io:: Result < ( ) > {
256
- self . 0 . set_only_v6 ( only_v6)
257
- }
258
-
259
- /// Gets the value of the `IPV6_V6ONLY` option for this socket.
260
- ///
261
- /// For more information about this option, see [`set_only_v6`][link].
262
- ///
263
- /// [link]: #method.set_only_v6
264
- #[ stable( feature = "net2_mutators" , since = "1.9.0" ) ]
265
- pub fn only_v6 ( & self ) -> io:: Result < bool > {
266
- self . 0 . only_v6 ( )
267
- }
268
-
269
246
/// Executes an operation of the `IP_ADD_MEMBERSHIP` type.
270
247
///
271
248
/// This function specifies a new multicast group for this socket to join.
Original file line number Diff line number Diff line change @@ -247,15 +247,6 @@ impl TcpStream {
247
247
Ok ( raw as u32 )
248
248
}
249
249
250
- pub fn set_only_v6 ( & self , only_v6 : bool ) -> io:: Result < ( ) > {
251
- setsockopt ( & self . inner , c:: IPPROTO_IPV6 , c:: IPV6_V6ONLY , only_v6 as c_int )
252
- }
253
-
254
- pub fn only_v6 ( & self ) -> io:: Result < bool > {
255
- let raw: c_int = getsockopt ( & self . inner , c:: IPPROTO_IPV6 , c:: IPV6_V6ONLY ) ?;
256
- Ok ( raw != 0 )
257
- }
258
-
259
250
pub fn take_error ( & self ) -> io:: Result < Option < io:: Error > > {
260
251
self . inner . take_error ( )
261
252
}
@@ -544,15 +535,6 @@ impl UdpSocket {
544
535
Ok ( raw as u32 )
545
536
}
546
537
547
- pub fn set_only_v6 ( & self , only_v6 : bool ) -> io:: Result < ( ) > {
548
- setsockopt ( & self . inner , c:: IPPROTO_IPV6 , c:: IPV6_V6ONLY , only_v6 as c_int )
549
- }
550
-
551
- pub fn only_v6 ( & self ) -> io:: Result < bool > {
552
- let raw: c_int = getsockopt ( & self . inner , c:: IPPROTO_IPV6 , c:: IPV6_V6ONLY ) ?;
553
- Ok ( raw != 0 )
554
- }
555
-
556
538
pub fn take_error ( & self ) -> io:: Result < Option < io:: Error > > {
557
539
self . inner . take_error ( )
558
540
}
You can’t perform that action at this time.
0 commit comments