-
-
Save dorentus/69eec5806858c6f1e9cf5b85930e9d81 to your computer and use it in GitHub Desktop.
demo.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn serv(host: &str, port: u16) { | |
let server = match std::net::TcpListener::bind(format!("{}:{}", host, port)) { | |
Err(error) => { | |
println!("{}", error); | |
return; | |
} | |
Ok(server) => server, | |
}; | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment