Ignore ack syn when using vegas

This commit is contained in:
Atlante45 2016-09-26 17:17:41 -07:00 committed by Stephen Birarda
parent 9760fdc906
commit 3d0f449afb
2 changed files with 7 additions and 3 deletions

View file

@ -112,6 +112,7 @@ SendQueue& Connection::getSendQueue() {
qCDebug(networking) << "Created SendQueue for connection to" << _destination; qCDebug(networking) << "Created SendQueue for connection to" << _destination;
#endif #endif
QObject::connect(_sendQueue.get(), &SendQueue::packetSent, this, &Connection::packetSent);
QObject::connect(_sendQueue.get(), &SendQueue::packetSent, this, &Connection::recordSentPackets); QObject::connect(_sendQueue.get(), &SendQueue::packetSent, this, &Connection::recordSentPackets);
QObject::connect(_sendQueue.get(), &SendQueue::packetRetransmitted, this, &Connection::recordRetransmission); QObject::connect(_sendQueue.get(), &SendQueue::packetRetransmitted, this, &Connection::recordRetransmission);
QObject::connect(_sendQueue.get(), &SendQueue::queueInactive, this, &Connection::queueInactive); QObject::connect(_sendQueue.get(), &SendQueue::queueInactive, this, &Connection::queueInactive);
@ -515,7 +516,10 @@ bool Connection::processReceivedSequenceNumber(SequenceNumber sequenceNumber, in
++_packetsSinceACK; ++_packetsSinceACK;
// check if we need to send an ACK, according to CC params // check if we need to send an ACK, according to CC params
if (_congestionControl->_ackInterval > 0 && _packetsSinceACK >= _congestionControl->_ackInterval * _acksDuringSYN) { if (_congestionControl->_ackInterval == 1) {
// Using TCP Vegas
sendACK(true);
} else if (_congestionControl->_ackInterval > 0 && _packetsSinceACK >= _congestionControl->_ackInterval * _acksDuringSYN) {
_acksDuringSYN++; _acksDuringSYN++;
sendACK(false); sendACK(false);
} else if (_congestionControl->_lightACKInterval > 0 } else if (_congestionControl->_lightACKInterval > 0

View file

@ -25,7 +25,7 @@ const QCommandLineOption TARGET_OPTION {
"IP:PORT or HOSTNAME:PORT" "IP:PORT or HOSTNAME:PORT"
}; };
const QCommandLineOption PACKET_SIZE { const QCommandLineOption PACKET_SIZE {
"packet-size", "size for sent packets in bytes (defaults to " + QString(udt::MAX_PACKET_SIZE) + ")", "bytes", "packet-size", "size for sent packets in bytes (defaults to " + QString::number(udt::MAX_PACKET_SIZE) + ")", "bytes",
QString(udt::MAX_PACKET_SIZE) QString(udt::MAX_PACKET_SIZE)
}; };
const QCommandLineOption MIN_PACKET_SIZE { const QCommandLineOption MIN_PACKET_SIZE {