You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
511 B

use std::io;
mod conf;
mod prov;
mod stream;
fn main() -> io::Result<()> {
let mut input = io::stdin().lock();
let mut output = stream::ThrottleAdaptor::new(prov::UniformThrottleProvider::from(prov::Duration::from_millis(5)..prov::Duration::from_millis(50)), prov::UniformBufferProvider::from(0usize..=10), io::stdout().lock());
let copied = io::copy(&mut input, &mut output)?;
if cfg!(debug_assertions) {
eprintln!("Copied {copied} bytes from input -{output:?}> output");
}
Ok(())
}