ServicePoint.ConnectionLimit Eigenschaft

Definition

Ruft die maximale Anzahl von Verbindungen ab, die für dieses ServicePoint-Objekt zulässig sind, oder legt diese fest.

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

Eigenschaftswert

Die maximale Anzahl von Verbindungen, die für dieses ServicePoint-Objekt zulässig sind.

Ausnahmen

Die Verbindungsgrenze ist kleiner oder gleich 0.

Beispiele

Im folgenden Codebeispiel wird die ConnectionLimit -Eigenschaft verwendet, um die maximale Anzahl von Verbindungen zu überprüfen, die das ServicePoint Objekt mit dem angegebenen URI (Uniform Resource Identifier) herstellen kann.

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()))

Hinweise

Die ConnectionLimit -Eigenschaft legt die maximale Anzahl von Verbindungen fest, die das ServicePoint Objekt mit einer Internetressource herstellen kann. Der Wert der ConnectionLimit -Eigenschaft wird auf den Wert der ServicePointManager.DefaultConnectionLimit -Eigenschaft festgelegt, wenn das ServicePoint Objekt erstellt wird. Nachfolgende Änderungen haben DefaultConnectionLimit keine Auswirkungen auf vorhandene ServicePoint Objekte.

Gilt für:

Weitere Informationen