diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/src/main.rs b/src/main.rs index 42208dc..398e76d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,6 +14,7 @@ use std::sync::mpsc; mod cli; mod upnp; +mod serve; fn main() { let app = App::new(env!("CARGO_PKG_NAME")) @@ -47,29 +48,31 @@ fn main() { process::exit(1); } - let _udp = thread::spawn(move || { - upnp::discover(); - }); + serve::run(); - let (tx, rx) = mpsc::channel(); - let child = thread::spawn(move || { - let mut controller = cli::Controller::init(); - loop { - let c = controller.read(); - tx.send(c).unwrap(); - if c == 113 { - break; - } - } - controller.destroy(); - }); + // let _udp = thread::spawn(move || { + // upnp::discover(); + // }); - for received in rx { - println!("Got char: {}", received); - } + // let (tx, rx) = mpsc::channel(); + // let child = thread::spawn(move || { + // let mut controller = cli::Controller::init(); + // loop { + // let c = controller.read(); + // tx.send(c).unwrap(); + // if c == 113 { + // break; + // } + // } + // controller.destroy(); + // }); + + // for received in rx { + // println!("Got char: {}", received); + // } - println!("Waiting for all thread"); - let _res = child.join(); - println!("Done!"); + // println!("Waiting for all thread"); + // let _res = child.join(); + // println!("Done!"); } |
