File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1632,7 +1632,7 @@ impl Socket {
16321632 target_os = "espidf" ,
16331633 target_os = "vita" ,
16341634 ) ) ) ]
1635- pub fn set_recv_tos ( & self , recv_tos : bool ) -> io:: Result < ( ) > {
1635+ pub fn set_recv_tos_v4 ( & self , recv_tos : bool ) -> io:: Result < ( ) > {
16361636 unsafe {
16371637 setsockopt (
16381638 self . as_raw ( ) ,
@@ -1645,9 +1645,9 @@ impl Socket {
16451645
16461646 /// Get the value of the `IP_RECVTOS` option for this socket.
16471647 ///
1648- /// For more information about this option, see [`set_recv_tos `].
1648+ /// For more information about this option, see [`set_recv_tos_v4 `].
16491649 ///
1650- /// [`set_recv_tos `]: Socket::set_recv_tos
1650+ /// [`set_recv_tos_v4 `]: Socket::set_recv_tos_v4
16511651 #[ cfg( not( any(
16521652 target_os = "aix" ,
16531653 target_os = "dragonfly" ,
@@ -1663,7 +1663,7 @@ impl Socket {
16631663 target_os = "espidf" ,
16641664 target_os = "vita" ,
16651665 ) ) ) ]
1666- pub fn recv_tos ( & self ) -> io:: Result < bool > {
1666+ pub fn recv_tos_v4 ( & self ) -> io:: Result < bool > {
16671667 unsafe {
16681668 getsockopt :: < c_int > ( self . as_raw ( ) , sys:: IPPROTO_IP , sys:: IP_RECVTOS )
16691669 . map ( |recv_tos| recv_tos > 0 )
Original file line number Diff line number Diff line change @@ -1425,7 +1425,7 @@ test!(IPv4 tos_v4, set_tos_v4(96));
14251425 target_os = "vita" ,
14261426 target_os = "haiku" ,
14271427) ) ) ]
1428- test ! ( IPv4 recv_tos , set_recv_tos ( true ) ) ;
1428+ test ! ( IPv4 recv_tos_v4 , set_recv_tos_v4 ( true ) ) ;
14291429
14301430#[ cfg( not( windows) ) ] // TODO: returns `WSAENOPROTOOPT` (10042) on Windows.
14311431test ! ( IPv4 broadcast, set_broadcast( true ) ) ;
You can’t perform that action at this time.
0 commit comments