Hello,
Welcome to our Microsoft Q&A platform!
Did you use a network proxy such as a VPN when testing? In my test, normal traffic data cannot be obtained when the VPN is enabled.
Maybe you can try another special method to connect with StreamSocket
for downlink speed:
public async Task GetNetworkSpeed()
{
double currentSpeed = 0;
var socket = new StreamSocket();
socket.Control.NoDelay = true;
socket.Control.QualityOfService = SocketQualityOfService.LowLatency;
socket.Control.KeepAlive = false;
using (socket)
{
await socket.ConnectAsync(new HostName("bing.com"), "80", SocketProtectionLevel.PlainSocket);
currentSpeed = socket.Information.RoundTripTimeStatistics.Min / 1000000.0;
}
return currentSpeed;
}
Thanks.