A simple implementation of RDT (Reliable Data Transfer) 3.0.
You need to run in correct order: interceptor, receiver, then sender.
25% of packets will be dropped. Another 25% of packets will be corrupted by randomly changing one byte. You can change the percentage by editing intercepter.py.
Usage: python interceptor.py FromSenderPort ToReceiverPort FromReceiverPort ToSenderPort
python interceptor.py 1600 1601 1602 1603
python receiver.py 127.0.0.1 1602 127.0.0.1 1601
python sender.py 127.0.0.1 1600 127.0.0.1 1603 file.txt