ServicePoint.ConnectionLimit Propriedade

Definição

Obtém ou define o número máximo de conexões permitidas neste objeto ServicePoint.

public:
 property int ConnectionLimit { int get(); void set(int value); };
public int ConnectionLimit { get; set; }
member this.ConnectionLimit : int with get, set
Public Property ConnectionLimit As Integer

Valor da propriedade

O número máximo de conexões permitidas neste objeto ServicePoint.

Exceções

O limite de conexão é igual ou menor do que 0.

Exemplos

O exemplo de código a seguir usa a ConnectionLimit propriedade para marcar o número máximo de conexões que o ServicePoint objeto pode fazer com o URI (Uniform Resource Identifier) especificado.

Console::WriteLine( "ConnectionName = {0}", sp->ConnectionName );

// Display the maximum number of connections allowed on this 
// ServicePoint instance.
Console::WriteLine( "ConnectionLimit = {0}", sp->ConnectionLimit );

// Display the number of connections associated with this 
// ServicePoint instance.
Console::WriteLine( "CurrentConnections = {0}", sp->CurrentConnections );
Console.WriteLine("ConnectionName = " + sp.ConnectionName);

// Display the maximum number of connections allowed on this
// ServicePoint instance.
Console.WriteLine("ConnectionLimit = " + sp.ConnectionLimit);

// Display the number of connections associated with this
// ServicePoint instance.
Console.WriteLine("CurrentConnections = " + sp.CurrentConnections);
Console.WriteLine(("ConnectionName = " + sp.ConnectionName))

' Display the maximum number of connections allowed on this 
' ServicePoint instance.
Console.WriteLine(("ConnectionLimit = " + sp.ConnectionLimit.ToString()))

' Display the number of connections associated with this 
' ServicePoint instance.
Console.WriteLine(("CurrentConnections = " + sp.CurrentConnections.ToString()))

Comentários

A ConnectionLimit propriedade define o número máximo de conexões que o ServicePoint objeto pode fazer a um recurso da Internet. O valor da ConnectionLimit propriedade é definido como o valor da ServicePointManager.DefaultConnectionLimit propriedade quando o ServicePoint objeto é criado; alterações subsequentes não DefaultConnectionLimit têm efeito sobre objetos existentes ServicePoint .

Aplica-se a

Confira também