https://github.com/anivie/tcp-test
An experiment on computer networks was conducted, which successfully completed the full three-way handshake and four-way handshake. It was implemented using unsafe Rust FFI and was also encapsulated in a simple manner
https://github.com/anivie/tcp-test
handshake raw-sockets rust tcp tcp-client-server tcp-socket
Last synced: about 2 months ago
JSON representation
An experiment on computer networks was conducted, which successfully completed the full three-way handshake and four-way handshake. It was implemented using unsafe Rust FFI and was also encapsulated in a simple manner
- Host: GitHub
- URL: https://github.com/anivie/tcp-test
- Owner: Anivie
- Created: 2024-01-04T05:32:12.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-24T03:12:50.000Z (about 1 year ago)
- Last Synced: 2025-01-10T21:27:21.827Z (3 months ago)
- Topics: handshake, raw-sockets, rust, tcp, tcp-client-server, tcp-socket
- Language: Rust
- Homepage:
- Size: 101 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
### English in [here](https://github.com/Anivie/tcp-test/blob/master/README_EN.MD)
## 一次关于计算机网络的实验
使用raw socket,我使用(unsafe) rust ffi来完成这一功能,过程非常曲折(
目前已经完成,可以正常握手并接收信息,连接的目标是tokio的echo demo本项目参考于[这个实验](https://github.com/MaxXor/raw-sockets-example/blob/master/rawsockets.c),我使用rust手动实现并进行了简单的封装
你可以在Linux中直接使用`cargo run`来运行这段程序
测试的连接目标为[TcpListener](https://docs.rs/tokio/1.35.1/tokio/net/struct.TcpListener.html),我将其封装为独立的[服务器](https://github.com/Anivie/tcp-test-server)测试环境:
- Ubuntu(WSL)
- Rust Nightly