Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WinHttpHandler: apply [SupportedOSPlatform("windows10.0.19041")] on TcpKeepAlive properties #45494

Merged
merged 2 commits into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ public WinHttpHandler() { }
public System.Func<System.Net.Http.HttpRequestMessage, System.Security.Cryptography.X509Certificates.X509Certificate2, System.Security.Cryptography.X509Certificates.X509Chain, System.Net.Security.SslPolicyErrors, bool>? 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) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -418,9 +419,11 @@ public TimeSpan ReceiveDataTimeout
/// Gets or sets a value indicating whether TCP keep-alive is enabled.
/// </summary>
/// <remarks>
/// Only supported on Windows 10 version 2004 or newer.
/// If enabled, the values of <see cref="TcpKeepAliveInterval" /> and <see cref="TcpKeepAliveTime"/> will be forwarded
/// to set WINHTTP_OPTION_TCP_KEEPALIVE, enabling and configuring TCP keep-alive for the backing TCP socket.
/// </remarks>
[SupportedOSPlatform("windows10.0.19041")]
public bool TcpKeepAliveEnabled
{
get
Expand All @@ -438,9 +441,11 @@ public bool TcpKeepAliveEnabled
/// Gets or sets the TCP keep-alive timeout.
/// </summary>
/// <remarks>
/// Only supported on Windows 10 version 2004 or newer.
/// Has no effect if <see cref="TcpKeepAliveEnabled"/> is <see langword="false" />.
/// The default value of this property is 2 hours.
/// </remarks>
[SupportedOSPlatform("windows10.0.19041")]
public TimeSpan TcpKeepAliveTime
{
get
Expand All @@ -459,9 +464,11 @@ public TimeSpan TcpKeepAliveTime
/// Gets or sets the TCP keep-alive interval.
/// </summary>
/// <remarks>
/// Only supported on Windows 10 version 2004 or newer.
/// Has no effect if <see cref="TcpKeepAliveEnabled"/> is <see langword="false" />.
/// The default value of this property is 1 second.
/// </remarks>
[SupportedOSPlatform("windows10.0.19041")]
public TimeSpan TcpKeepAliveInterval
{
get
Expand Down