This commit is contained in:
Emma Tebibyte 2023-06-27 20:55:44 -06:00
parent 7b24173bbd
commit daa46ffe79
Signed by: emma
GPG Key ID: 6D661C738815E7DD
1 changed files with 5 additions and 3 deletions

View File

@ -25,10 +25,12 @@ use std::{
use liminality::handle_client;
const DEFAULT_PORT: &str = "3123";
fn main() {
let listener = TcpListener::bind("0.0.0.0:8080")
.expect("Failed to bind to port 8080.");
println!("Server listening on port 8080.");
let listener = TcpListener::bind(format!("0.0.0.0:{}", DEFAULT_PORT))
.expect(&format!("Failed to bind to port {}.", DEFAULT_PORT));
println!("Server listening on port {}.", DEFAULT_PORT);
let connections: Arc<Mutex<HashMap<usize, TcpStream>>> = Arc::new(
Mutex::new(HashMap::new())