ServicePoint.CurrentConnections Propiedad
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Obtiene el número de conexiones abiertas asociadas a este objeto ServicePoint.
public:
property int CurrentConnections { int get(); };
public int CurrentConnections { get; }
member this.CurrentConnections : int
Public ReadOnly Property CurrentConnections As Integer
Número de conexiones abiertas asociadas a este objeto ServicePoint.
En el ejemplo de código siguiente se usa la propiedad CurrentConnections para determinar el número de conexiones abiertas de Internet asociadas a este objeto 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()))
Precaución
WebRequest
, HttpWebRequest
, ServicePoint
y WebClient
están obsoletos y no debe usarlos para el nuevo desarrollo. Use HttpClient en su lugar.
La propiedad CurrentConnections contiene el número de conexiones abiertas a Internet asociadas a este objeto ServicePoint. El valor de CurrentConnections no puede superar el de ConnectionLimit.
Producto | Versiones |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Comentarios de .NET
.NET es un proyecto de código abierto. Seleccione un vínculo para proporcionar comentarios: