ServicePoint.ConnectionName 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得連接名稱。
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 = {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()))
備註
ServicePoint如果對象是藉由呼叫FindServicePoint具有Uri自變數的多載所建構,則 ConnectionName 屬性代表Scheme所使用的物件屬性Uri。
ServicePoint如果對像是從網路主機和埠建構的,則 ConnectionName 屬性會包含代表主機和網路埠的字串。 ConnectionName如果從主機和埠建構時設定屬性,則只有WebRequest具有相同ConnectionGroupName值的物件可以使用這個ServicePoint物件。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應