EsotericSoftware/kryonet — pull request #76 by cobolfoo (2014-09-16 02:40:43+00:00)
Title: Added bandwidth monitoring feature

There is a change I use in one of my game. It allowed me to track bandwidth usage at bytes level.
Both TCP and UDP connection have his own bandwidth monitor.

Typical usage:

To get debug output (current bandwidth once per second in console)
client.getTcp().getBandwidth().setDebug(true);

To retrieve last bandwidth information saved:
client.getTcp().getBandwidth().getLastInformation();

I could also get all the information saved(several seconds at once):
client.getTcp().getBandwidth().getHistory();

By default the history size is set to 120 seconds.