MCPcopy Index your code
hub / github.com/bedroombuilds/python2rust / main

Function main

1b_sockets/rust/echoserver.rs:5–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3use std::thread;
4
5fn main() {
6 let listener = TcpListener::bind("127.0.0.1:12321").unwrap();
7 for stream in listener.incoming() {
8 let stream = stream.unwrap();
9 thread::spawn(move || handle_client(stream));
10 }
11}
12
13fn handle_client(stream: TcpStream) {
14 let mut stream = BufReader::new(stream);

Callers

nothing calls this directly

Calls 1

handle_clientFunction · 0.70

Tested by

no test coverage detected