diff options
Diffstat (limited to 'blog/src/main.rs')
| -rw-r--r-- | blog/src/main.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/blog/src/main.rs b/blog/src/main.rs new file mode 100644 index 0000000..0dba17a --- /dev/null +++ b/blog/src/main.rs @@ -0,0 +1,14 @@ +use std::net::TcpListener; + +use spider::handle_client; + +fn main() -> std::io::Result<()> { + let listener = TcpListener::bind("localhost:3000")?; + + // accept connections and process them serially + for stream in listener.incoming() { + handle_client(stream?); + } + + Ok(()) +} |