@@ -1129,11 +1129,21 @@ const fn into_linger(duration: Option<Duration>) -> sys::linger {
11291129/// * Linux: <https://man7.org/linux/man-pages/man7/ip.7.html>
11301130/// * Windows: <https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-ip-socket-options>
11311131impl Socket {
1132+ /// This method is deprecated, use [`crate::Socket::header_included_v4`].
1133+ #[ cfg( all( feature = "all" , not( any( target_os = "redox" , target_os = "espidf" ) ) ) ) ]
1134+ #[ cfg_attr(
1135+ docsrs,
1136+ doc( cfg( all( feature = "all" , not( any( target_os = "redox" , target_os = "espidf" ) ) ) ) )
1137+ ) ]
1138+ #[ deprecated = "Use `Socket::header_included_v4` instead" ]
1139+ pub fn header_included ( & self ) -> io:: Result < bool > {
1140+ self . header_included_v4 ( )
1141+ }
11321142 /// Get the value of the `IP_HDRINCL` option on this socket.
11331143 ///
1134- /// For more information about this option, see [`set_header_included_v4 `].
1144+ /// For more information about this option, see [`set_header_included `].
11351145 ///
1136- /// [`set_header_included_v4 `]: Socket::set_header_included_v4
1146+ /// [`set_header_included `]: Socket::set_header_included
11371147 #[ cfg( all( feature = "all" , not( any( target_os = "redox" , target_os = "espidf" ) ) ) ) ]
11381148 pub fn header_included_v4 ( & self ) -> io:: Result < bool > {
11391149 unsafe {
@@ -1142,6 +1152,21 @@ impl Socket {
11421152 }
11431153 }
11441154
1155+ /// This method is deprecated, use [`crate::Socket::set_header_included_v4`].
1156+ #[ cfg_attr(
1157+ any( target_os = "fuchsia" , target_os = "illumos" , target_os = "solaris" ) ,
1158+ allow( rustdoc:: broken_intra_doc_links)
1159+ ) ]
1160+ #[ cfg( all( feature = "all" , not( any( target_os = "redox" , target_os = "espidf" ) ) ) ) ]
1161+ #[ cfg_attr(
1162+ docsrs,
1163+ doc( cfg( all( feature = "all" , not( any( target_os = "redox" , target_os = "espidf" ) ) ) ) )
1164+ ) ]
1165+ #[ deprecated = "Use `Socket::set_header_included_v4` instead" ]
1166+ pub fn set_header_included ( & self , included : bool ) -> io:: Result < ( ) > {
1167+ self . set_header_included_v4 ( included)
1168+ }
1169+
11451170 /// Set the value of the `IP_HDRINCL` option on this socket.
11461171 ///
11471172 /// If enabled, the user supplies an IP header in front of the user data.
@@ -1632,9 +1657,9 @@ impl Socket {
16321657impl Socket {
16331658 /// Get the value of the `IP_HDRINCL` option on this socket.
16341659 ///
1635- /// For more information about this option, see [`set_header_included_v6 `].
1660+ /// For more information about this option, see [`set_header_included `].
16361661 ///
1637- /// [`set_header_included_v6 `]: Socket::set_header_included_v6
1662+ /// [`set_header_included `]: Socket::set_header_included
16381663 #[ cfg( all(
16391664 feature = "all" ,
16401665 not( any(
0 commit comments