Merge branch 'atp' of https://github.com/birarda/hifi into protocol

This commit is contained in:
Atlante45 2015-07-28 18:13:10 -07:00
commit d31c237cc3
2 changed files with 5 additions and 1 deletions

View file

@ -440,3 +440,7 @@ void Connection::updateRTT(int rtt) {
_rttVariance = (_rttVariance * (1 - RTT_ESTIMATION_VARIANCE_ALPHA_NUMERATOR)
+ abs(rtt - _rtt)) / RTT_ESTIMATION_VARIANCE_ALPHA_NUMERATOR;
}
int Connection::estimatedTimeout() const {
return _congestionControl->_userDefinedRto ? _rtt + _rttVariance * 4 : _congestionControl->_rto;
}

View file

@ -59,7 +59,7 @@ private:
void updateRTT(int rtt);
int estimatedTimeout() const { return _rtt + _rttVariance * 4; }
int estimatedTimeout() const;
int _synInterval; // Periodical Rate Control Interval, in microseconds, defaults to 10ms