The project implements a reliable transfer protocol on top of UDP using congestion control strategies inspired by TCP.
Cumulative ACK is implemented such that the acknum sent by the server is the same as the sequence number the server is expecting next. AIMD is implemented using a congestion window no larger than the WINDOW_SIZE macro defined in utils.h. The Slow Start netowrking approach is activated when the current window size is below a hard-coded threshold ssthresh. When the window size exceeds this threshold, congestion avoidance (additive increase) is used. If 3 or more duplicate ACKs occur, fast retransmit and fast recovery is used to handle this following a selective repeat approach. Also, timers for each transmitting packet are implemented. If a packet doesn't receive an ACK addressing it for the amount of time specified for a timeout, the client runs a hard timeout where the window size goes to 1 and retransmits the packet that timed out. If there were more than 3 duplicate ACKs before a timeout, if (# duplicate ACKs % 3) is not 0, fast recovery is run and otherwise, fast retransmit is repeated. The aim of this strategy is to avoid hard timeouts to increase protocol efficiency.