stream_limiter
Synchronously speed-limiting streams.
This crate provides a Limiter struct that can be used to limit the rate at which a stream can be read or written.
This crate is based on the token bucket algorithm. When we want to read data and we are rate limited the packet aren't drop but we sleep.
Example:
use Limiter;
use Duration;
use *;
use File;
let mut file = open.unwrap;
let mut limiter = new;
let mut buf = ;
let now = now;
limiter.read.unwrap;
assert_eq!;