This project aims to measuring TCP/UDP protocol performance with Python in Raspberry Pi 4 via Ethernet connection.
- TCP: Transmission Control Protocol
- UDP: User Datagram Protocol
- Both TCP/UDP Client and Server
- Performance Measurement: Latency - Throughput - Reliability
- Ethernet cable and Modem
- Raspberry Pi 4 (4GB at least)
- SD Card (32GB at least) and reader
- I initially tested with C-based implementations but did not achieve effective results.
Therefore, I focused on Python-based UDP packet transmission.
The project follows this directory structure:
tcp-udp-ethernet/
├── client/
│ ├── tcp_client.py
│ ├── udp_client_packet.py
│ └── udp_client.py
│
├── server/
│ ├── tcp_server.py
│ ├── udp_server_packet.py
│ └── udp_server.py
│
├── test/
│ ├── test_client.c
│ └── test_server.c
│
├── .gitignore
├── LICENSE
├── README.md
└── requirements.txt
- client/: Contains client side codes.
- server/: Contains server side codes.
- test/: Contains test codes written in C.
- requirements.txt: Lists project dependencies.
- Install dependencies:
pip install -r requirements.txt
or
pip3 install -r requirements.txt
- Run (example):
python3 tcp_server.py
and
python3 tcp_client.py
This project is licensed under the MIT License - see the LICENSE file for details.