ServicePointManager.DefaultPersistentConnectionLimit Field

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

The default number of persistent connections (2) allowed on a ServicePoint object connected to an HTTP/1.1 or later server. This field is constant and is used to initialize the DefaultConnectionLimit property if the value of the DefaultConnectionLimit property has not been set either directly or through configuration.

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

public const int DefaultPersistentConnectionLimit

Field Value

Type: System.Int32

The following code example sets the DefaultConnectionLimit property using this field.

ServicePointManager.UseNagleAlgorithm = true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.CheckCertificateRevocationList = true;
ServicePointManager.DefaultConnectionLimit = ServicePointManager.DefaultPersistentConnectionLimit;

.NET Framework
Available since 1.1
Return to top
Show: