Compartilhar via


ServicePointManager.DefaultPersistentConnectionLimit Campo

Definição

O número padrão de conexões persistentes (2) permitidas em um ServicePoint objeto conectado a um servidor HTTP/1.1 ou posterior. Esse campo é constante e é usado para inicializar a DefaultConnectionLimit propriedade se o valor da DefaultConnectionLimit propriedade não tiver sido definido diretamente ou por meio da configuração.

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

Valor do campo

Value = 2

Exemplos

O exemplo de código a seguir define a DefaultConnectionLimit propriedade usando esse campo.

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

Aplica-se a