mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 00:34:22 +02:00
use enum in PacketHeaders, coding standard fixes in Connection
This commit is contained in:
parent
e7c0ed035f
commit
fdcface8cb
3 changed files with 9 additions and 6 deletions
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
@ -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<PacketVersion>(AssetServerPacketVersion::VegasCongestionControl);
|
||||
case PacketType::NodeIgnoreRequest:
|
||||
return 18; // Introduction of node ignore request (which replaced an unused packet tpye)
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue