ServicePoint.CurrentConnections 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取与此 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值。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈