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

Side by Side Diff: net/quic/quic_multipath_received_packet_manager.h

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 4 months 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_http_utils_test.cc ('k') | net/quic/quic_multipath_received_packet_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // A connection level received packet manager which manages multiple per path
6 // received packet managers.
7
8 #ifndef NET_QUIC_QUIC_MULTIPATH_RECEIVED_PACKET_MANAGER_H_
9 #define NET_QUIC_QUIC_MULTIPATH_RECEIVED_PACKET_MANAGER_H_
10
11 #include <unordered_map>
12 #include <vector>
13
14 #include "net/quic/quic_protocol.h"
15 #include "net/quic/quic_received_packet_manager.h"
16
17 namespace net {
18
19 namespace test {
20 class QuicMultipathReceivedPacketManagerPeer;
21 } // namespace test
22
23 class NET_EXPORT_PRIVATE QuicMultipathReceivedPacketManager {
24 public:
25 typedef std::unordered_map<QuicPathId, QuicReceivedPacketManager*>
26 MultipathReceivedPacketManagerMap;
27
28 explicit QuicMultipathReceivedPacketManager(QuicConnectionStats* stats);
29 ~QuicMultipathReceivedPacketManager();
30
31 // Called when a new path with |path_id| is created.
32 void OnPathCreated(QuicPathId path_id, QuicConnectionStats* stats);
33
34 // Called when path with |path_id| is closed.
35 void OnPathClosed(QuicPathId path_id);
36
37 // Records packet receipt information on path with |path_id|.
38 void RecordPacketReceived(QuicPathId path_id,
39 QuicByteCount bytes,
40 const QuicPacketHeader& header,
41 QuicTime receipt_time);
42
43 // Checks whether |packet_number| is missing on path with |path_id|.
44 bool IsMissing(QuicPathId path_id, QuicPacketNumber packet_number);
45
46 // Checks if we're still waiting for the packet with |packet_number| on path
47 // with |path_id|.
48 bool IsAwaitingPacket(QuicPathId path_id, QuicPacketNumber packet_number);
49
50 // If |force_all_paths| is false, populates ack information for paths whose
51 // ack has been updated since UpdateReceivedPacketInfo was called last time.
52 // Otherwise, populates ack for all paths.
53 void UpdateReceivedPacketInfo(std::vector<QuicAckFrame>* ack_frames,
54 QuicTime approximate_now,
55 bool force_all_paths);
56
57 // Updates internal state based on stop_waiting frames for corresponding path.
58 void UpdatePacketInformationSentByPeer(
59 const std::vector<QuicStopWaitingFrame>& stop_waitings);
60
61 // Returns true when there are new missing packets to be reported within 3
62 // packets of the largest observed on path with |path_id|.
63 bool HasNewMissingPackets(QuicPathId path_id) const;
64
65 QuicPacketNumber GetPeerLeastPacketAwaitingAck(QuicPathId path_id);
66
67 private:
68 friend class test::QuicMultipathReceivedPacketManagerPeer;
69
70 // Map mapping path id to path received packet manager.
71 MultipathReceivedPacketManagerMap path_managers_;
72 };
73
74 } // namespace net
75
76 #endif // NET_QUIC_QUIC_MULTIPATH_RECEIVED_PACKET_MANAGER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_http_utils_test.cc ('k') | net/quic/quic_multipath_received_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698