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 对象关联的已打开 Internet 连接数。

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

注解

属性 CurrentConnections 包含与此 ServicePoint 对象关联的已打开 Internet 连接数。 的值 CurrentConnections 不能超过 的 ConnectionLimit值。

适用于