Quick first reaction, so maybe I'm being clueless. But, my first thought is to ask: is this really the right place for such a facility?
This seems like a bug in the server. But failing that, it seems like a "limit transfer rate to HOST:PORT to 10Mb/s" or whatever belongs in a network policy, like a firewall rule or wherever bandwidth limitations go. Otherwise we end up cluttering up the logic of every network-capable program to basically include a little baby network bandwidth policy submodule. There are also ways of enforcing limits (CPU limits, memory limits, etc) on programs. "help ulimit" under bash. This isn't set up to limit network bandwidth, but maybe it should be? Or some other sandbox/wrapper thing: it's not like there's any shortage of such mechanisms in a modern bloated Linux kernel! Bottom line: I'm thinking these kinds of policy restrictions seem like they belong in layers outside client programs.