extern crate env_logger; extern crate futures; extern crate libtftp; extern crate tokio_core; use futures::empty; use tokio_core::reactor::Core; use libtftp::Tftp; fn main() { env_logger::init(); let mut core = Core::new().unwrap(); let handle = core.handle(); Tftp::new("localhost:6969", &handle) .with_data([0xa1; 0x4000].as_ref()) .spawn_server(); let forever = empty::<(), ()>(); core.run(forever).unwrap(); }