mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:17:45 +02:00
Merge branch 'protocol' of https://github.com/Atlante45/hifi into atp
This commit is contained in:
commit
036cb8859d
3 changed files with 5 additions and 9 deletions
|
@ -17,7 +17,7 @@ using namespace udt;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
void LossList::append(SequenceNumber seq) {
|
void LossList::append(SequenceNumber seq) {
|
||||||
assert(_lossList.back().second < seq);
|
assert(_lossList.empty() || _lossList.back().second < seq);
|
||||||
|
|
||||||
if (getLength() > 0 && _lossList.back().second + 1 == seq) {
|
if (getLength() > 0 && _lossList.back().second + 1 == seq) {
|
||||||
++_lossList.back().second;
|
++_lossList.back().second;
|
||||||
|
|
|
@ -45,12 +45,12 @@ public:
|
||||||
}
|
}
|
||||||
inline SequenceNumber operator++(int) {
|
inline SequenceNumber operator++(int) {
|
||||||
SequenceNumber before = *this;
|
SequenceNumber before = *this;
|
||||||
(*this)++;
|
++(*this);
|
||||||
return before;
|
return before;
|
||||||
}
|
}
|
||||||
inline SequenceNumber operator--(int) {
|
inline SequenceNumber operator--(int) {
|
||||||
SequenceNumber before = *this;
|
SequenceNumber before = *this;
|
||||||
(*this)--;
|
--(*this);
|
||||||
return before;
|
return before;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -162,12 +162,8 @@ void Socket::readPendingDatagrams() {
|
||||||
|
|
||||||
if (packet->isReliable()) {
|
if (packet->isReliable()) {
|
||||||
// if this was a reliable packet then signal the matching connection with the sequence number
|
// if this was a reliable packet then signal the matching connection with the sequence number
|
||||||
// assuming it exists
|
auto connection = findOrCreateConnection(senderSockAddr);
|
||||||
auto it = _connectionsHash.find(senderSockAddr);
|
connection->processReceivedSequenceNumber(packet->getSequenceNumber());
|
||||||
|
|
||||||
if (it != _connectionsHash.end()) {
|
|
||||||
it->second->processReceivedSequenceNumber(packet->getSequenceNumber());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_packetHandler) {
|
if (_packetHandler) {
|
||||||
|
|
Loading…
Reference in a new issue