c# - High network usage in network monitor -
i have program displays network usage in 2 labels
. use networkinterface
array network interfaces. problem network usage way high (95 mb received/s). looked interface array , noticed there lot of interfaces listed there. don't know why think because network @ company work complex, goes through several proxies , servers before "reaching" internet.
if assumption correct, how can filter out needed interfaces (lan and/or wlan)? looked properties cannot see useful information.
private void updatenetwork() { if (interfaces != null) { long received = 0; long sent = 0; foreach (networkinterface netinterface in interfaces) { received = received + netinterface.getipv4statistics().bytesreceived; sent = received + netinterface.getipv4statistics().bytessent; } label1.text = "received: " + received; label2.text = "sent: " + sent; } }
Comments
Post a Comment