mirror of
https://github.com/xvxx/phd
synced 2024-11-04 18:00:22 +00:00
just use ipv4 for now
This commit is contained in:
parent
bc794153d3
commit
a38d8cf50a
@ -23,7 +23,7 @@ const IGNORED_FILES: [&str; 3] = ["header.gph", "footer.gph", ".reverse"];
|
|||||||
|
|
||||||
/// Starts a Gopher server at the specified host, port, and root directory.
|
/// Starts a Gopher server at the specified host, port, and root directory.
|
||||||
pub fn start(host: &str, port: u16, root: &str) -> Result<()> {
|
pub fn start(host: &str, port: u16, root: &str) -> Result<()> {
|
||||||
let addr = format!("{}:{}", "[::1]", port);
|
let addr = format!("{}:{}", "0.0.0.0", port);
|
||||||
let listener = TcpListener::bind(&addr)?;
|
let listener = TcpListener::bind(&addr)?;
|
||||||
let full_root_path = fs::canonicalize(&root)?.to_string_lossy().to_string();
|
let full_root_path = fs::canonicalize(&root)?.to_string_lossy().to_string();
|
||||||
let pool = ThreadPool::new(MAX_WORKERS);
|
let pool = ThreadPool::new(MAX_WORKERS);
|
||||||
|
Loading…
Reference in New Issue
Block a user