ServicePoint.ConnectionName プロパティ

定義

接続名を取得します。

public:
 property System::String ^ ConnectionName { System::String ^ get(); };
public string ConnectionName { get; }
member this.ConnectionName : string
Public ReadOnly Property ConnectionName As String

プロパティ値

接続名を表す String

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

注釈

Caution

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

ServicePoint オブジェクトがUri引数を使用してFindServicePointオーバーロードを呼び出すことによって構築された場合、ConnectionName プロパティは、使用されるUri オブジェクトのScheme プロパティを表します。

ServicePoint オブジェクトがネットワーク ホストとポートから構築された場合、ConnectionName プロパティには、ホストとネットワーク ポートを表す文字列が含まれます。 ホストとポートから構築するときに ConnectionName プロパティが設定されている場合、同じConnectionGroupName値を持つWebRequest オブジェクトのみが、このServicePoint オブジェクトを使用できます。

適用対象

こちらもご覧ください