diff --git a/src/libraries/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.cs b/src/libraries/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.cs index 12c86997fb1e0..c9c63bb27e826 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.cs @@ -44,8 +44,11 @@ public WinHttpHandler() { } public System.Func? ServerCertificateValidationCallback { get { throw null; } set { } } public System.Net.ICredentials? ServerCredentials { get { throw null; } set { } } public System.Security.Authentication.SslProtocols SslProtocols { get { throw null; } set { } } + [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows10.0.19041")] public bool TcpKeepAliveEnabled { get { throw null; } set { } } + [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows10.0.19041")] public System.TimeSpan TcpKeepAliveTime { get { throw null; } set { } } + [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows10.0.19041")] public System.TimeSpan TcpKeepAliveInterval { get { throw null; } set { } } public System.Net.Http.WindowsProxyUsePolicy WindowsProxyUsePolicy { get { throw null; } set { } } protected override void Dispose(bool disposing) { } diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs index 1525bc936e01d..4df57194f60f0 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs @@ -7,6 +7,7 @@ using System.Net.Http.Headers; using System.Net.Security; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; using System.Text; @@ -418,9 +419,11 @@ public TimeSpan ReceiveDataTimeout /// Gets or sets a value indicating whether TCP keep-alive is enabled. /// /// + /// Only supported on Windows 10 version 2004 or newer. /// If enabled, the values of and will be forwarded /// to set WINHTTP_OPTION_TCP_KEEPALIVE, enabling and configuring TCP keep-alive for the backing TCP socket. /// + [SupportedOSPlatform("windows10.0.19041")] public bool TcpKeepAliveEnabled { get @@ -438,9 +441,11 @@ public bool TcpKeepAliveEnabled /// Gets or sets the TCP keep-alive timeout. /// /// + /// Only supported on Windows 10 version 2004 or newer. /// Has no effect if is . /// The default value of this property is 2 hours. /// + [SupportedOSPlatform("windows10.0.19041")] public TimeSpan TcpKeepAliveTime { get @@ -459,9 +464,11 @@ public TimeSpan TcpKeepAliveTime /// Gets or sets the TCP keep-alive interval. /// /// + /// Only supported on Windows 10 version 2004 or newer. /// Has no effect if is . /// The default value of this property is 1 second. /// + [SupportedOSPlatform("windows10.0.19041")] public TimeSpan TcpKeepAliveInterval { get