ServicePoint.ConnectionName Egenskap

Definition

Hämtar anslutningsnamnet.

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

Egenskapsvärde

En String som representerar anslutningsnamnet.

Exempel

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

Kommentarer

Caution

WebRequest, HttpWebRequest, ServicePoint, och WebClient är föråldrade och du bör inte använda dem för ny utveckling. Använd HttpClient i stället.

Om objektet ServicePoint skapades genom att anropa en FindServicePoint överlagring med ett Uri argument representerar ConnectionNameScheme egenskapen egenskapen för det Uri objekt som används.

Om objektet ServicePoint har konstruerats från en nätverksvärd och port ConnectionName innehåller egenskapen en sträng som representerar värden och nätverksporten. Om egenskapen anges när den ConnectionName konstrueras från en värd och port kan endast WebRequest objekt med samma ConnectionGroupName värde använda det här ServicePoint objektet.

Gäller för

Se även