mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-09 10:00:57 +03:00
Add received packets timestamps to AckState
Summary: Store timestamps/packet numbers of recently received packets in AckState. - The maximum number of packets stored is controlled by kMaxReceivedPktsTimestampsStored. - The packet number of entries in the deque is guarenteed to increase monotonically because an entry is only added for a received packet if the packet number is greater than the packet number of the last element in the deque (e.g., entries are not added for packets that arrive out of order relative to previously received packets). Reviewed By: bschlinker Differential Revision: D37799023 fbshipit-source-id: 3b6bf2ba8ea15219a87bbdc2724fe23eebe66b70
This commit is contained in:
committed by
Facebook GitHub Bot
parent
650773ed59
commit
328c78d0e2
@@ -1318,7 +1318,7 @@ void onServerReadDataFromOpen(
|
||||
if (conn.peerAddress != readData.peer) {
|
||||
// TODO use new conn id, make sure the other endpoint has new conn id
|
||||
if (isNonProbingPacket) {
|
||||
if (packetNum == ackState.largestReceivedPacketNum) {
|
||||
if (packetNum == ackState.largestRecvdPacketNum) {
|
||||
ShortHeader* shortHeader = regularPacket.header.asShort();
|
||||
bool intentionalMigration = false;
|
||||
if (shortHeader &&
|
||||
@@ -1531,10 +1531,10 @@ void onServerReadDataFromClosed(
|
||||
|
||||
// We only need to set the largest received packet number in order to
|
||||
// determine whether or not we need to send a new close.
|
||||
auto& largestReceivedPacketNum =
|
||||
getAckState(conn, pnSpace).largestReceivedPacketNum;
|
||||
largestReceivedPacketNum = std::max<PacketNum>(
|
||||
largestReceivedPacketNum.value_or(packetNum), packetNum);
|
||||
auto& largestRecvdPacketNum =
|
||||
getAckState(conn, pnSpace).largestRecvdPacketNum;
|
||||
largestRecvdPacketNum =
|
||||
std::max<PacketNum>(largestRecvdPacketNum.value_or(packetNum), packetNum);
|
||||
}
|
||||
|
||||
void onServerClose(QuicServerConnectionState& conn) {
|
||||
|
||||
Reference in New Issue
Block a user