blob: 0dba17a47e7a95e58ff57b91beaadb6dc2e0aab2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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(())
}
|