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

Function handle_client

1b_sockets/rust/echoserver.rs:13–22  ·  view source on GitHub ↗
(stream: TcpStream)

Source from the content-addressed store, hash-verified

11}
12
13fn handle_client(stream: TcpStream) {
14 let mut stream = BufReader::new(stream);
15 loop {
16 let mut buf = String::new();
17 if stream.read_line(&mut buf).is_err() {
18 break;
19 }
20 stream.get_ref().write(buf.as_bytes()).unwrap();
21 }
22}

Callers 1

mainFunction · 0.70

Calls 1

read_lineMethod · 0.80

Tested by

no test coverage detected