ServicePoint.ConnectionLimit Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta il numero massimo di connessioni consentite sull'oggetto 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
Valore della proprietà
Numero massimo di connessioni consentite sull'oggetto ServicePoint.
Eccezioni
Il limite di connessione è minore o uguale a 0.
Esempio
Nell'esempio di codice seguente viene utilizzata la ConnectionLimit proprietà per controllare il numero massimo di connessioni che l'oggetto può effettuare all'URI ServicePoint (Uniform Resource Identifier) specificato.
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()))
Commenti
La ConnectionLimit proprietà imposta il numero massimo di connessioni che l'oggetto ServicePoint può effettuare a una risorsa Internet. Il valore della ConnectionLimit proprietà viene impostato sul valore della ServicePointManager.DefaultConnectionLimit proprietà quando viene creato l'oggetto ServicePoint . Le modifiche DefaultConnectionLimit successive non hanno alcun effetto sugli oggetti esistenti ServicePoint .
Si applica a
Vedi anche
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per