Поделиться через


ServicePointManager.DefaultPersistentConnectionLimit Поле

Определение

Число постоянных подключений (2) по умолчанию, разрешенное для ServicePoint объекта, подключенного к серверу HTTP/1.1 или более поздней версии. Это поле является константой и используется для инициализации DefaultConnectionLimit свойства, если значение DefaultConnectionLimit свойства не задано напрямую или через конфигурацию.

public: int DefaultPersistentConnectionLimit = 2;
public const int DefaultPersistentConnectionLimit = 2;
val mutable DefaultPersistentConnectionLimit : int
Public Const DefaultPersistentConnectionLimit As Integer  = 2

Значение поля

Value = 2

Примеры

Следующий пример кода задает DefaultConnectionLimit свойство с помощью этого поля.

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

Применяется к