I am trying to understand congestion control, specially in contrast to flow control.
What I understand so far: in flow control, the receiver advertises windows for the packet sequence numbers, so the sender knows how fast to send data.
In congestion control, the sender stops sending data when the sequence number of its ACKs lags behind the sequence number it will use for sending packets: "If I don't get ACKs, packets must be dropping, and that can be a problem in the network, so I should slowdown".
Is this view (roughly) correct? Does it depend on the TCP sender not being malicious? Because what if the sender does not slow down when the network is overloaded? It could steal bandwidth from other clients couldn't it?