Send light acks based on CC member

This commit is contained in:
Atlante45 2015-07-29 16:24:58 -07:00
parent 96dc033de1
commit ce1fc4baa9
2 changed files with 3 additions and 0 deletions

View file

@ -68,6 +68,7 @@ private:
CongestionControl& operator=(const CongestionControl& other) = delete;
int _ackInterval { 0 }; // How many packets to send one ACK, in packets
int _lightACKInterval { 64 }; // How many packets to send one light ACK, in packets
int _synInterval { DEFAULT_SYN_INTERVAL };

View file

@ -282,6 +282,8 @@ void Connection::processReceivedSequenceNumber(SequenceNumber seq) {
// check if we need to send an ACK, according to CC params
if (_congestionControl->_ackInterval > 0 && _packetsSinceACK >= _congestionControl->_ackInterval) {
sendACK(false);
} else if (_congestionControl->_lightACKInterval > 0 && _packetsSinceACK >= _congestionControl->_lightACKInterval) {
sendLightACK();
}
}