From b2145131ccde0a33b9840ac04c8b7d79e733ae12 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 8 Jan 2025 11:14:01 +0100 Subject: reset --- client/src/main.rs | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) (limited to 'client/src/main.rs') 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!"); } -- cgit v1.2.3-70-g09d2