I have finished grading Assignment 2.
There are couple of common mistakes that worth highlighting here:
- If you receive a corrupted packet, you should not look at the content of the packet, since you cannot tell which bit is corrupted! Many of you still assume that p.seq is valid even when p.isCorrupted is true. For this, I takes off two points.
- Another common bug is that you did not make sure that all timers are cancelled when the connection is closed. As a result, the sender goes into infinite loop sending forever (and encountering exceptions forever).
- The last packet should be treated as any other packet. This means the sender should still ensure that it is received correctly, by repeated retransmitting until it does. Some of you forgot about this and only ensures that the packets are sent correctly, except the last one!