0
プロキシをpingしてping時間を取得したい(たとえば41ms)。プロキシ・ピング・タイムを取得するVB.Net
私はこのコードを試してみましたが、私はping時間を得ていません。
If My.Computer.Network.Ping("216.58.194.51") Then
MsgBox("Success")
Else
MsgBox("Failed")
End If
プロキシをpingしてping時間を取得したい(たとえば41ms)。プロキシ・ピング・タイムを取得するVB.Net
私はこのコードを試してみましたが、私はping時間を得ていません。
If My.Computer.Network.Ping("216.58.194.51") Then
MsgBox("Success")
Else
MsgBox("Failed")
End If
Dim Result As Net.NetworkInformation.PingReply
Dim SendPing As New Net.NetworkInformation.Ping
Dim ResponseTime As Long
Try
Result = SendPing.Send("216.58.194.51")
ResponseTime = Result.RoundtripTime
If Result.Status = Net.NetworkInformation.IPStatus.Success Then
MsgBox(ResponseTime.ToString) 'ResponseTime is response time
Else
End If
Catch ex As Exception
MsgBox("No response")
End Try