Test Nework Latency Using VB.NET
vb.net
Solution
Here you have a ping example for VB.NET
Dim host As String = "82.123.23.XX" ' use any other machine name
Dim pingreq As Ping = New Ping()
Dim rep As PingReply = pingreq.Send(host )
Console.WriteLine("Pinging {0} [{1}]", host , rep.Address.ToString())
Console.WriteLine("Reply From {0} : time={1} TTL={2}", rep.Address.ToString(), rep.RoundtripTime, rep.Options.Ttl)
You will need to Import
System.Net.NetworkInformation
Problem
Goal: take a list of servers' external ip address. perform a ping to test latency. Like in CMD the ping command shows an average latency. But in visual studio I found the ping only as Boolean for connectivity to a server. How might I go about testing latency to a server to find the fastest connection possible in vb.net? I can't find any other way to do a ping other than. `my.computer.network.ping(192.168.1.1)`. So is there another way to accomplish a latency test in vb.net? Thanks! Skill Lvl: close to absolute beginner