I am in a situation where I am limited by limited bandwidth and must use most of the bandwidth to transmit one type of measurement data. Sometimes I will send a lot of measurement data, and in other cases I will just wait for events (all this is via a TCP socket).
I would like to be able to transfer a complete data capture file (different from measurements) in the background at a speed that is inversely proportional to the number of measurements that I send back.
I am looking for a way to track how many bytes are sent through a network interface, much like the Ubuntu system monitor. The source code for the system monitor depends on the gnome libraries, and since my program is on an embedded device, I would like to reduce the number of external libraries that I use. Does anyone know a way to do this in C / C ++ without many additional libraries in the standard Linux distribution?
source
share