This commit is contained in:
David Rowe 2021-10-15 09:37:37 +13:00
parent 8e653c3a65
commit 4b871d1073
5 changed files with 6 additions and 7 deletions

View file

@ -505,8 +505,8 @@ qint64 LimitedNodeList::sendUnreliableUnorderedPacketList(NLPacketList& packetLi
}
return bytesSent;
} else {
qCDebug(networking) << "LimitedNodeList::sendPacketList called without active socket for node" << destinationNode
<< " - not sending.";
qCDebug(networking) << "LimitedNodeList::sendUnreliableUnorderedPacketList called without active socket for node"
<< destinationNode << " - not sending.";
return ERROR_SENDING_PACKET_BYTES;
}
}

View file

@ -35,7 +35,6 @@ private:
virtual std::unique_ptr<udt::Packet> createPacket() override;
PacketVersion _packetVersion;
NLPacket::LocalID _sourceID;
};

View file

@ -54,7 +54,7 @@ Connection::Connection(Socket* parentSocket, SockAddr destination, std::unique_p
static std::mt19937 generator(rd());
static std::uniform_int_distribution<> distribution(0, SequenceNumber::MAX);
// randomize the intial sequence number
// randomize the initial sequence number
_initialSequenceNumber = SequenceNumber(distribution(generator));
}

View file

@ -25,8 +25,8 @@ public:
using UType = uint32_t;
// Values are for 27 bit SequenceNumber
static const Type THRESHOLD = 0x03FFFFFF; // threshold for comparing sequence numbers
static const Type MAX = 0x07FFFFFF; // maximum sequence number used in UDT
static const Type THRESHOLD = 0x03FFFFFF; // Threshold for comparing sequence numbers.
static const Type MAX = 0x07FFFFFF; // Maximum sequence number used in UDT.
SequenceNumber() = default;
SequenceNumber(const SequenceNumber& other) : _value(other._value) {}

View file

@ -207,7 +207,7 @@ qint64 Socket::writePacketList(std::unique_ptr<PacketList> packetList, const Soc
return 0;
}
// Unerliable and Unordered
// Unreliable and Unordered
qint64 totalBytesSent = 0;
while (!packetList->_packets.empty()) {
totalBytesSent += writePacket(packetList->takeFront<Packet>(), sockAddr);