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

Function main

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

Source from the content-addressed store, hash-verified

3use std::net::TcpStream;
4
5fn main() {
6 let mut stream = TcpStream::connect("127.0.0.1:12321").unwrap();
7
8 let len = stream.write(b"hello socket world\n");
9 println!("written {:?}", len);
10 let mut reader = BufReader::new(stream);
11 let mut line = String::new();
12 let len = reader.read_line(&mut line);
13 println!("{:?} {:?}", &line, len);
14}

Callers

nothing calls this directly

Calls 1

read_lineMethod · 0.80

Tested by

no test coverage detected