1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
use std::net::{TcpListener, TcpStream}; use std::io::Read; use std::thread; mod configuration; mod udp_connection; mod tcp_connection; #[tokio::main] async fn main() { configuration::load_config(); configuration::show_info_conf(); if configuration::get_connection_type() == configuration::ConnectionType::TCP { tcp_connection::start_connection().await; }else{ udp_connection::start_connection().await; } }