Overview
Flow control is essential when a fast computer is sending data to a slower one or one with limited buffer space. It ensures that data is not lost due to buffer overflows at the receiver.
Mechanisms
- Stop-and-Wait: The sender waits for an ACK for every packet before sending the next.
- Sliding Window: The receiver specifies a 'window size' (how much data it can accept). The sender can send up to that amount before needing an ACK.
Implementation
In TCP, the window size is dynamically adjusted in the TCP header to reflect the current state of the receiver's buffer.