diff --git a/libraries/networking/src/udt/Connection.cpp b/libraries/networking/src/udt/Connection.cpp index 45ecf11e50..6d17670cce 100644 --- a/libraries/networking/src/udt/Connection.cpp +++ b/libraries/networking/src/udt/Connection.cpp @@ -152,13 +152,13 @@ void Connection::queueInactive() { } void Connection::queueTimeout() { - updateCongestionControlAndSendQueue([this]{ + updateCongestionControlAndSendQueue([this] { _congestionControl->onTimeout(); }); } void Connection::queueShortCircuitLoss(quint32 sequenceNumber) { - updateCongestionControlAndSendQueue([this, sequenceNumber]{ + updateCongestionControlAndSendQueue([this, sequenceNumber] { _congestionControl->onLoss(SequenceNumber { sequenceNumber }, SequenceNumber { sequenceNumber }); }); } @@ -691,7 +691,7 @@ void Connection::processACK(ControlPacketPointer controlPacket) { } // give this ACK to the congestion control and update the send queue parameters - updateCongestionControlAndSendQueue([this, ack, &controlPacket](){ + updateCongestionControlAndSendQueue([this, ack, &controlPacket] { if (_congestionControl->onACK(ack, controlPacket->getReceiveTime())) { // the congestion control has told us it needs a fast re-transmit of ack + 1, add that now _sendQueue->fastRetransmit(ack + 1); @@ -780,7 +780,7 @@ void Connection::processNAK(ControlPacketPointer controlPacket) { getSendQueue().nak(start, end); // give the loss to the congestion control object and update the send queue parameters - updateCongestionControlAndSendQueue([this, start, end](){ + updateCongestionControlAndSendQueue([this, start, end] { _congestionControl->onLoss(start, end); }); diff --git a/libraries/networking/src/udt/PacketHeaders.cpp b/libraries/networking/src/udt/PacketHeaders.cpp index f737700c55..7e788ce02b 100644 --- a/libraries/networking/src/udt/PacketHeaders.cpp +++ b/libraries/networking/src/udt/PacketHeaders.cpp @@ -58,8 +58,7 @@ PacketVersion versionForPacketType(PacketType packetType) { case PacketType::AssetGetInfo: case PacketType::AssetGet: case PacketType::AssetUpload: - // Introduction of TCPVegasCC as default congestion control - return 19; + return static_cast(AssetServerPacketVersion::VegasCongestionControl); case PacketType::NodeIgnoreRequest: return 18; // Introduction of node ignore request (which replaced an unused packet tpye) diff --git a/libraries/networking/src/udt/PacketHeaders.h b/libraries/networking/src/udt/PacketHeaders.h index aa775b9f53..844847e791 100644 --- a/libraries/networking/src/udt/PacketHeaders.h +++ b/libraries/networking/src/udt/PacketHeaders.h @@ -189,6 +189,10 @@ const PacketVersion VERSION_MODEL_ENTITIES_SUPPORT_SIMPLE_HULLS = 62; const PacketVersion VERSION_WEB_ENTITIES_SUPPORT_DPI = 63; const PacketVersion VERSION_ENTITIES_ARROW_ACTION = 64; +enum class AssetServerPacketVersion: PacketVersion { + VegasCongestionControl = 19 +}; + enum class AvatarMixerPacketVersion : PacketVersion { TranslationSupport = 17, SoftAttachmentSupport,