ServicePoint.CurrentConnections プロパティ

定義

この ServicePoint オブジェクトに関連付けられている開いている接続の数を取得します。

public:
 property int CurrentConnections { int get(); };
public int CurrentConnections { get; }
member this.CurrentConnections : int
Public ReadOnly Property CurrentConnections As Integer

プロパティ値

この ServicePoint オブジェクトに関連付けられている開いている接続の数。

次のコード例では、CurrentConnections プロパティを使用して、この ServicePoint オブジェクトに関連付けられている開いているインターネット接続の数を決定します。

// Display the ServicePoint Internet resource address.
Console::WriteLine( "Address = {0}", sp->Address );
// Display the ServicePoint Internet resource address.
Console.WriteLine("Address = {0} ", sp.Address.ToString());
' Display the ServicePoint Internet resource address.
Console.WriteLine(("Address = " + sp.Address.ToString()))

注釈

注意

WebRequestHttpWebRequestServicePointWebClient は廃止されており、新しい開発には使用しないでください。 代わりに HttpClient を使用してください。

CurrentConnections プロパティには、この ServicePoint オブジェクトに関連付けられている開いているインターネット接続の数が含まれています。 CurrentConnections の値は、ConnectionLimitの値を超えることはできません。

適用対象