Skip to content
Open
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
4 changes: 4 additions & 0 deletions xml/System.Net/ServicePoint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,8 @@ Although a <xref:System.Net.ServicePoint> object can make multiple connections t

The <xref:System.Net.ServicePoint.ConnectionLimit> property sets the maximum number of connections that the <xref:System.Net.ServicePoint> object can make to an Internet resource. The value of the <xref:System.Net.ServicePoint.ConnectionLimit> property is set to the value of the <xref:System.Net.ServicePointManager.DefaultConnectionLimit?displayProperty=nameWithType> property when the <xref:System.Net.ServicePoint> object is created; subsequent changes to <xref:System.Net.ServicePointManager.DefaultConnectionLimit> have no effect on existing <xref:System.Net.ServicePoint> objects.

The connection limit does not apply to proxied connections nor proxy tunnels.

> [!NOTE]
> Since .NET 9, this property maps to <xref:System.Net.Http.SocketsHttpHandler.MaxConnectionsPerServer?displayProperty=nameWithType>. However, handlers are not being reused between requests so it doesn't have any meaningful impact.

Expand Down Expand Up @@ -1152,6 +1154,8 @@ The `GetHashCode` method returns a hash code of this instance. This value can be

If a TCP connection is dropped as the result of keep-alives, a <xref:System.Net.Sockets.SocketError> of <xref:System.Net.Sockets.SocketError.NetworkReset> is returned to any calls in progress on the socket, and any subsequent calls will fail with a <xref:System.Net.Sockets.SocketError> of <xref:System.Net.Sockets.SocketError.NotConnected>.

This method is not thread-safe. Any new connection created at the same time might see partially changed values for the TCP keep-alive.

> [!NOTE]
> Since .NET 9, <xref:System.Net.HttpWebRequest> uses <xref:System.Net.Http.SocketsHttpHandler.ConnectCallback?displayProperty=nameWithType> to set TCP keep alive options on the underlying socket to the values provided to this method.

Expand Down
4 changes: 3 additions & 1 deletion xml/System.Net/ServicePointManager.xml
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@
<format type="text/markdown"><![CDATA[

## Remarks
When you reduce the <xref:System.Net.ServicePointManager.MaxServicePoints> property below the number of <xref:System.Net.ServicePoint> objects currently in existence, the <xref:System.Net.ServicePointManager> deletes the <xref:System.Net.ServicePoint> objects with the longest idle times. If the number of <xref:System.Net.ServicePoint> objects with active connections is greater than the value of <xref:System.Net.ServicePointManager.MaxServicePoints%2A>, the <xref:System.Net.ServicePointManager> object deletes the <xref:System.Net.ServicePoint> objects as they become idle.
When you reduce the <xref:System.Net.ServicePointManager.MaxServicePoints> property below the number of <xref:System.Net.ServicePoint> objects currently in existence, the <xref:System.Net.ServicePointManager> deletes the <xref:System.Net.ServicePoint> objects with the longest idle times. If the number of <xref:System.Net.ServicePoint> objects with active connections is greater than the value of <xref:System.Net.ServicePointManager.MaxServicePoints%2A>, the <xref:System.Net.ServicePointManager> object deletes the <xref:System.Net.ServicePoint> objects as they become idle. If this limit is set and more distinct <xref:System.Net.ServicePoint> instances are requested, <xref:System.Net.ServicePointManager.FindServicePoint%2A> will throw. As a result, <xref:System.Net.HttpWebRequest>s leading to new, distinct endpoints will fail.

> [!NOTE]
> This property is only implemented on .NET Framework.
Expand Down Expand Up @@ -1280,6 +1280,8 @@ Each callback returns a value that indicates whether the certificate is accepted

If a TCP connection is dropped as the result of keep-alives, a <xref:System.Net.Sockets.SocketError> of <xref:System.Net.Sockets.SocketError.NetworkReset> is returned to any calls in progress on the socket, and any subsequent calls will fail with a <xref:System.Net.Sockets.SocketError> of <xref:System.Net.Sockets.SocketError.NotConnected>.

This method is not thread-safe. Any <xref:System.Net.ServicePoint> created at the same time might see partially changed values for the TCP keep-alive.

> [!NOTE]
> Since .NET 9, <xref:System.Net.HttpWebRequest> uses <xref:System.Net.Http.SocketsHttpHandler.ConnectCallback?displayProperty=nameWithType> to set TCP keep alive options on the underlying socket to the values provided to this method.

Expand Down
Loading