https://github.com/zacksleo/rust-tcp-server
rust tcp server
https://github.com/zacksleo/rust-tcp-server
Last synced: 8 months ago
JSON representation
rust tcp server
- Host: GitHub
- URL: https://github.com/zacksleo/rust-tcp-server
- Owner: zacksleo
- License: mit
- Created: 2021-07-20T15:35:05.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-24T02:23:33.000Z (almost 5 years ago)
- Last Synced: 2025-04-01T21:17:19.220Z (about 1 year ago)
- Language: Rust
- Size: 232 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rust-tcp-server
## 运行
```bash
cargo run
```
## 测试
```bash
> telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
world
world
Connection closed by foreign host.
```
## 截图

## 参考资料
- [Tcp Listener](https://doc.rust-lang.org/std/net/struct.TcpListener.html)
- [Tcp Stream](https://doc.rust-lang.org/std/net/struct.TcpStream.html)
- [单线程webserver](https://kaisery.github.io/trpl-zh-cn/ch20-01-single-threaded.html)
- [Rust Cookbook](https://rust-lang-nursery.github.io/rust-cookbook/net/server.html)
- [A simple TCP clientand server application](https://riptutorial.com/rust/example/4404/a-simple-tcp-client-and-server-application--echo)