netIoCounters

fnNetIoCounters[string] netIoCounters(bool pernic = true) @safe

Gets network I/O counters.

Parameters

pernicIf true, returns counters per interface. If false, returns totals.

Returns

Associative array mapping interface names to NetIoCounters.

Example:

auto counters = netIoCounters();
foreach (iface, counter; counters) {
  writeln(iface, ": sent ", counter.bytesSent, " bytes");
}