2 releases

Uses old Rust 2015

0.0.1 Dec 5, 2015
0.0.0 Sep 9, 2015

#48 in #loop

MIT license

19KB
485 lines

tick

An event loop implementation using eventual Promises Futures and Streams.


lib.rs:

Tick

An implementation of Transports, Protocols, and Streams over mio.

Example

use tick::{Tick, Protocol, Transfer};

struct Echo(Transfer);
impl Protocol<Tcp> for Echo {
    fn on_data(&mut self, data: &[u8]) {
        println!("data received: {:?}", data);
        self.0.write(data);
    }
}

let mut tick = Tick::new(Echo);
tick.accept(listener);
tick.run();

Dependencies

~3.5MB
~70K SLoC