A high-performance, custom implementation of a reliable transport protocol built on UDP with sliding window flow control, achieving 5.51 MB/s throughput with 100% data integrity.
Custom implementation of a reliable transport layer protocol demonstrating advanced networking concepts including sliding window flow control, SHA-256 data integrity validation, and multi-threaded concurrent processing. Achieves up to 7,372% performance improvement over stop-and-wait protocols.
- Custom reliable transport protocol built from scratch on UDP
 - Sliding window flow control with configurable window sizes
 - SHA-256 checksums for cryptographic data integrity
 - Multi-threaded architecture with concurrent packet processing
 - Perfect reliability (100% success rate in testing)
 - Scalable performance (improves with larger files)
 
| File Size | Stop-and-Wait | Sliding Window | Improvement | 
|---|---|---|---|
| 3MB | 0.07 MB/s | 1.52 MB/s | +2,004% | 
| 10MB | 0.07 MB/s | 3.85 MB/s | +5,083% | 
| 20MB | 0.07 MB/s | 5.51 MB/s | +7,372% | 
This report contains:
- Detailed methodology and testing environment specifications
 - Complete performance metrics for all file sizes and window configurations
 - Statistical analysis of sliding window effectiveness
 - Technical implementation validation results
 - Cross-configuration performance comparisons
 
git clone https://github.com/yourusername/reliable-udp-transfer.git
cd reliable-udp-transfer
python3 -m venv venv
source venv/bin/activateRun the complete test with both sender and receiver auto-launched:
python examples/fully_automated_test.pyFor manual testing, open two separate terminals.
Start the receiver first:
python examples/test_receiver.pyYou should see output like:
[Receiver] Listening on port 5001...
[Receiver] Receiving file: received_output.txtIn another terminal, start the sender:
python examples/test_sender.pyExpected output:
[Sender] Sending file: sample_input.txt
[Sender] File transfer complete.- Receiver listens for incoming UDP packets.
 - Sender sends a test file over UDP.
 - Receiver writes received data to a file.
 - You can verify file correctness manually or by checksum.
 
Edit src/utils/config.py:
DEFAULT_HOST = 'localhost'
DEFAULT_PORT = 8888
WINDOW_SIZE = 5       # Sliding window size
TIMEOUT = 2.0         # Packet timeout (seconds)
PACKET_SIZE = 1024    # Total packet size
DATA_SIZE = 1004      # Payload size** Testing Environment**: This protocol was developed and tested exclusively on localhost (127.0.0.1) on a single macOS system with optimal conditions (0% packet loss, <1ms latency).
Cross-System Deployment:
- NOT extensively tested between different computers
 - Real network conditions will impact performance significantly
 - Additional validation required for production use
 - Firewall configuration needed for network deployment
 
| Platform | Status | Notes | 
|---|---|---|
| macOS | Fully Tested | Primary development platform | 
| Linux | Expected | Standard Python/socket APIs | 
| Windows | Limited | May need minor modifications | 
This implementation demonstrates:
- Reliable transport protocol design
 - Sliding window flow control mechanisms
 - Multi-threaded network programming
 - Cryptographic data validation
 - Performance optimization techniques
 
Suitable for computer networks coursework, systems programming education, and network protocol research.
MIT License - see LICENSE file for details.
Concepts demonstrated from:
- RFC 793 (TCP specification)
 - RFC 768 (UDP specification)
 - Google QUIC protocol design
 - Modern reliable transport protocols
 
Status: Educational study
Performance: 5.51 MB/s peak throughput
Reliability: 100% success rate (localhost testing)
Last Updated: July 2025
- 
Fork the repository Click the
Forkbutton at the top-right of this page to create your own copy. - 
Clone your fork locally
 
git clone https://github.com/yourusername/reliable-udp-transfer.git
cd reliable-udp-transfer- Create a new branch for your feature or fix
 
git checkout -b feature/your-feature-name- 
Edit files, add new code, or fix bugs.
 - 
Commit Changes
 
git add .
git commit -m "Add: meaningful commit message"- Push to your fork
 
git push origin feature/your-feature-name- Proceed with pull request
 
Custom Protocol Architecture: Reliable UDP Implementation
Repository: https://github.com/Rklearns/reliable-udp-transfer
Performance: 5.51 MB/s peak throughput, 7,372% improvement over stop-and-wait
Date: July 2025