Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(553)

Unified Diff: net/quic/quic_multipath_received_packet_manager.h

Issue 1548703002: Add class QuicMultipathReceivedPacketManager (not in use currently). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110446931
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/net.gypi ('k') | net/quic/quic_multipath_received_packet_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_multipath_received_packet_manager.h
diff --git a/net/quic/quic_multipath_received_packet_manager.h b/net/quic/quic_multipath_received_packet_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..e33c5fccdb6bea2f2a09540f5d73de1cdd1018c1
--- /dev/null
+++ b/net/quic/quic_multipath_received_packet_manager.h
@@ -0,0 +1,78 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// A connection level received packet manager which manages multiple per path
+// received packet managers.
+
+#ifndef NET_QUIC_QUIC_MULTIPATH_RECEIVED_PACKET_MANAGER_H_
+#define NET_QUIC_QUIC_MULTIPATH_RECEIVED_PACKET_MANAGER_H_
+
+#include <vector>
+
+#include "net/quic/quic_protocol.h"
+#include "net/quic/quic_received_packet_manager.h"
+
+namespace net {
+
+namespace test {
+class QuicMultipathReceivedPacketManagerPeer;
+} // namespace test
+
+class NET_EXPORT_PRIVATE QuicMultipathReceivedPacketManager {
+ public:
+ typedef base::hash_map<QuicPathId, QuicReceivedPacketManager*>
+ MultipathReceivedPacketManagerMap;
+
+ explicit QuicMultipathReceivedPacketManager(QuicConnectionStats* stats);
+ ~QuicMultipathReceivedPacketManager();
+
+ // Called when a new path with |path_id| is created.
+ void OnPathCreated(QuicPathId path_id, QuicConnectionStats* stats);
+
+ // Called when path with |path_id| is closed.
+ void OnPathClosed(QuicPathId path_id);
+
+ // Records packet receipt information on path with |path_id|.
+ void RecordPacketReceived(QuicPathId path_id,
+ QuicByteCount bytes,
+ const QuicPacketHeader& header,
+ QuicTime receipt_time);
+
+ // Called when packet with |packet_number| is revived on path with |path_id|.
+ void RecordPacketRevived(QuicPathId path_id, QuicPacketNumber packet_number);
+
+ // Checks whether |packet_number| is missing on path with |path_id|.
+ bool IsMissing(QuicPathId path_id, QuicPacketNumber packet_number);
+
+ // Checks if we're still waiting for the packet with |packet_number| on path
+ // with |path_id|.
+ bool IsAwaitingPacket(QuicPathId path_id, QuicPacketNumber packet_number);
+
+ // If |force_all_paths| is false, populates ack information for paths whose
+ // ack has been updated since UpdateReceivedPacketInfo was called last time.
+ // Otherwise, populates ack for all paths.
+ void UpdateReceivedPacketInfo(std::vector<QuicAckFrame>* ack_frames,
+ QuicTime approximate_now,
+ bool force_all_paths);
+
+ // Updates internal state based on stop_waiting frames for corresponding path.
+ void UpdatePacketInformationSentByPeer(
+ const std::vector<QuicStopWaitingFrame>& stop_waitings);
+
+ // Returns true when there are new missing packets to be reported within 3
+ // packets of the largest observed on path with |path_id|.
+ bool HasNewMissingPackets(QuicPathId path_id) const;
+
+ QuicPacketNumber GetPeerLeastPacketAwaitingAck(QuicPathId path_id);
+
+ private:
+ friend class test::QuicMultipathReceivedPacketManagerPeer;
+
+ // Map mapping path id to path received packet manager.
+ MultipathReceivedPacketManagerMap path_managers_;
+};
+
+} // namespace net
+
+#endif // NET_QUIC_QUIC_MULTIPATH_RECEIVED_PACKET_MANAGER_H_
« no previous file with comments | « net/net.gypi ('k') | net/quic/quic_multipath_received_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698