我试图显示所有打开的TCP连接。但在我的代码中我收到了以下错误:
System.PlatformNotSupportedException 的HResult = 0x80131539 Nachricht =此平台不支持操作。
System.Net.NetworkInformation.NetNativeIPGlobalProperties.GetActiveTcpConnections()
这是我的代码,问题是,UWP不支持TcpConnectionInformation?:
try
{
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
TcpConnectionInformation[] connections = properties.GetActiveTcpConnections();
foreach (TcpConnectionInformation c in connections)
{
Liste.Items.Add(c.LocalEndPoint.ToString());
}
}
catch (Exception e1)