diff options
Diffstat (limited to 'client/src/main.rs')
-rw-r--r-- | client/src/main.rs | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/client/src/main.rs b/client/src/main.rs index b79f338..e7a11a9 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -1,41 +1,3 @@ -use log::{error, log, warn}; -use signal_hook::{ - consts::{SIGINT, SIGTERM}, - iterator::Signals, - low_level::exit, -}; -use std::{net::IpAddr, str::FromStr, sync::atomic::Ordering, thread, time::Duration}; -use twclient::{ - client::{Client, ClientConfig}, - SHOULD_EXIT, -}; - fn main() { - env_logger::init(); - - let mut signals = Signals::new(&[SIGTERM, SIGINT]).unwrap(); - thread::spawn(move || { - for sig in signals.forever() { - warn!("received signal {:?}", sig); - SHOULD_EXIT.store(true, Ordering::Relaxed); - thread::sleep(Duration::from_secs(3)); - error!("exit timeout!"); - exit(1); - } - }); - - let config = ClientConfig { - nick: String::from("metamuffin"), - clan: String::from("rustacean"), - timeout: String::from("asgefdhjikhjfhjf"), - }; - let mut args = std::env::args().skip(1); - let ip = IpAddr::from_str(args.next().unwrap().as_str()).unwrap(); - let port = u16::from_str(args.next().unwrap().as_str()).unwrap(); - drop(ip); - drop(port); - drop(config); - drop(Client::new_evloop()); - todo!() - // Client::run_thing(ip, port, config) + println!("Hello, world!"); } |