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 @@ -1607,7 +1607,7 @@ impl Socket {
16071607 target_os = "espidf" ,
16081608 target_os = "vita" ,
16091609 ) ) ) ]
1610- pub fn set_recv_tos ( & self , recv_tos : bool ) -> io:: Result < ( ) > {
1610+ pub fn set_recv_tos_v4 ( & self , recv_tos : bool ) -> io:: Result < ( ) > {
16111611 unsafe {
16121612 setsockopt (
16131613 self . as_raw ( ) ,
@@ -1620,9 +1620,9 @@ impl Socket {
16201620
16211621 /// Get the value of the `IP_RECVTOS` option for this socket.
16221622 ///
1623- /// For more information about this option, see [`set_recv_tos `].
1623+ /// For more information about this option, see [`set_recv_tos_v4 `].
16241624 ///
1625- /// [`set_recv_tos `]: Socket::set_recv_tos
1625+ /// [`set_recv_tos_v4 `]: Socket::set_recv_tos_v4
16261626 #[ cfg( not( any(
16271627 target_os = "aix" ,
16281628 target_os = "dragonfly" ,
@@ -1638,7 +1638,7 @@ impl Socket {
16381638 target_os = "espidf" ,
16391639 target_os = "vita" ,
16401640 ) ) ) ]
1641- pub fn recv_tos ( & self ) -> io:: Result < bool > {
1641+ pub fn recv_tos_v4 ( & self ) -> io:: Result < bool > {
16421642 unsafe {
16431643 getsockopt :: < c_int > ( self . as_raw ( ) , sys:: IPPROTO_IP , sys:: IP_RECVTOS )
16441644 . 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