functional server config

This commit is contained in:
2022-12-13 22:10:45 +01:00
parent d992981f22
commit 8991a7fbf0
8 changed files with 180 additions and 115 deletions

View File

@@ -8,7 +8,7 @@ use std::time::Duration;
use crate::protocol;
use crate::conf;
pub fn start_proxy(servers: Arc<RwLock<conf::Config>>){
pub fn start(servers: Arc<RwLock<conf::Config>>){
let listener = TcpListener::bind(String::from("0.0.0.0:") + servers.read().unwrap().get_port()).unwrap();
let guard = Arc::new(RwLock::new(guard::Guard::new()));
for stream in listener.incoming() {