ServicePointManager.ReusePort Property

.NET Framework (current version)

Setting this property value to true causes all outbound TCP connections from HttpWebRequest to use the native socket option SO_REUSE_UNICASTPORT on the socket. This causes the underlying outgoing ports to be shared. This is useful for scenarios where a large number of outgoing connections are made in a short time, and the app risks running out of ports.

Namespace:   System.Net
Assembly:  System (in System.dll)

public static bool ReusePort { get; set; }

Property Value

Type: System.Boolean

Returns Boolean.

The default value is false.

.NET Framework
Available since 4.6
Return to top