I just finished the first version of a throttling program that uses the environmental variable LD_PRELOAD to overwrite the read/recv and write/send (and many others) in order to throttle the banwidth used by that program.
It's just a test but it still works surprisingly well (for one day of coding :)