The receiver program will have an filename, filename.out , a port number and a window size as command line arguments. The receiver program establishes a port, and then waits for frames. As each frame is received, if the frame is not within the receiver's window, the frame is discarded. If permitted by the sliding window protocol, the receiver accepts the frame and checks the checksum. If the checksum is incorrect, the receiver discards the data.
Correct data is written in order to the output file.
Both programs should terminate after the file transfer is complete. If the sender times out waiting to receive an acknowledgement from the sender, all frames that have been sent but not acknowledged should be re-sent. To receive an A on the assignment, implement the full program, with separate timeouts for each packet sent. In your readme file, indicate which level you have implemented, and which sliding window protocol you have implemented. If you do the extra credit portion of the assignment, you may hand in your analysis in printed form.