You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
Peter Foot edited this page May 22, 2024
·
3 revisions
The InTheHand.Net.NetworkInformation namespace has functionality to access network statistics on a per-adapter basis. e.g.
using InTheHand.Net.NetworkInformation;
NetworkInterface[] interfaces = NetworkInterface.GetAllInterfaces();
//check the name properties to determine which interface to use
IPv4InterfaceStatistics stats = chosenInterface.GetIPv4Statistics();
int sent = stats.BytesSent;
int received = stats.BytesReceived;
//etc