mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-08 22:57:52 +00:00
print out number of NACKs
This commit is contained in:
parent
8c49f76534
commit
df21a067ff
@ -272,6 +272,7 @@ namespace stream
|
|||||||
size += 4; // ack Through
|
size += 4; // ack Through
|
||||||
packet[size] = 0;
|
packet[size] = 0;
|
||||||
size++; // NACK count
|
size++; // NACK count
|
||||||
|
packet[size] = RESEND_TIMEOUT;
|
||||||
size++; // resend delay
|
size++; // resend delay
|
||||||
if (!m_IsOpen)
|
if (!m_IsOpen)
|
||||||
{
|
{
|
||||||
@ -349,11 +350,11 @@ namespace stream
|
|||||||
size += 4; // sequenceNum
|
size += 4; // sequenceNum
|
||||||
htobe32buf (packet + size, lastReceivedSeqn);
|
htobe32buf (packet + size, lastReceivedSeqn);
|
||||||
size += 4; // ack Through
|
size += 4; // ack Through
|
||||||
|
uint8_t numNacks = 0;
|
||||||
if (lastReceivedSeqn > m_LastReceivedSequenceNumber)
|
if (lastReceivedSeqn > m_LastReceivedSequenceNumber)
|
||||||
{
|
{
|
||||||
// fill NACKs
|
// fill NACKs
|
||||||
uint8_t * nacks = packet + size + 1;
|
uint8_t * nacks = packet + size + 1;
|
||||||
uint8_t numNacks = 0;
|
|
||||||
auto nextSeqn = m_LastReceivedSequenceNumber + 1;
|
auto nextSeqn = m_LastReceivedSequenceNumber + 1;
|
||||||
for (auto it: m_SavedPackets)
|
for (auto it: m_SavedPackets)
|
||||||
{
|
{
|
||||||
@ -384,7 +385,7 @@ namespace stream
|
|||||||
p.len = size;
|
p.len = size;
|
||||||
|
|
||||||
SendPackets (std::vector<Packet *> { &p });
|
SendPackets (std::vector<Packet *> { &p });
|
||||||
LogPrint ("Quick Ack sent");
|
LogPrint ("Quick Ack sent. ", (int)numNacks, " NACKs");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stream::Close ()
|
void Stream::Close ()
|
||||||
|
Loading…
Reference in New Issue
Block a user