closes #3
This commit is contained in:
parent
7b24173bbd
commit
daa46ffe79
@ -25,10 +25,12 @@ use std::{
|
|||||||
|
|
||||||
use liminality::handle_client;
|
use liminality::handle_client;
|
||||||
|
|
||||||
|
const DEFAULT_PORT: &str = "3123";
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let listener = TcpListener::bind("0.0.0.0:8080")
|
let listener = TcpListener::bind(format!("0.0.0.0:{}", DEFAULT_PORT))
|
||||||
.expect("Failed to bind to port 8080.");
|
.expect(&format!("Failed to bind to port {}.", DEFAULT_PORT));
|
||||||
println!("Server listening on port 8080.");
|
println!("Server listening on port {}.", DEFAULT_PORT);
|
||||||
|
|
||||||
let connections: Arc<Mutex<HashMap<usize, TcpStream>>> = Arc::new(
|
let connections: Arc<Mutex<HashMap<usize, TcpStream>>> = Arc::new(
|
||||||
Mutex::new(HashMap::new())
|
Mutex::new(HashMap::new())
|
||||||
|
Loading…
Reference in New Issue
Block a user