How portrate/reliable-file-transfer-over-udp works
This is a Go-Back-N reliable file-transfer application over UDP. A client requests a named file; the server reads and segments it, sends sequenced packets within a sliding window, and retransmits unacknowledged packets after timeouts. The client checks packet integrity and order, writes accepted payloads, and returns cumulative ACKs until EOF. The README also documents configurable packet loss and corruption simulation. The supplied tree contains only the two endpoint programs; responsibilities below are separated conceptually within those files.
Main entry points: client.py Client workflow · server.py Server workflow
Components 12
Client
- Client workflow
Client/client.py - Packet codec
Client/client.py - Integrity check
Client/client.py - Order and ACK
Client/client.py - Output file
Client/client.py
Server
- Server workflow
Server/server.py - Packet codec
Server/server.py - File segmentation
Server/server.py - Window and retry
Server/server.py
Other components
- File requester
- UDP network
- Server files
Connections 18
- File requester → Client workflow: requests file
- Client workflow → Packet codec: packs request
- Client workflow → UDP network: sends request
- UDP network → Server workflow: delivers request
- Server workflow → Packet codec: unpacks request
- Server workflow → File segmentation: loads segments
- File segmentation → Server files: reads file
- Server workflow → Window and retry: starts transfer
- Window and retry → Packet codec: packs data and EOF
- Window and retry → UDP network: sends or retransmits
- UDP network → Client workflow: delivers packets
- Client workflow → Packet codec: unpacks packets
- Client workflow → Integrity check: checks payload
- Client workflow → Order and ACK: checks sequence
- Order and ACK → Output file: writes in-order data
- Order and ACK → Packet codec: packs ACK
- Client workflow → UDP network: sends ACK
- UDP network → Window and retry: delivers ACK