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

Side by Side Diff: net/quic/core/quic_multipath_transmissions_map.h

Issue 2547583002: Landing Recent QUIC changes until Fri Nov 18 23:21:04 2016 +0000 (Closed)
Patch Set: Remove explicit HTTP/2 enum usage Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A map manages packets which are transmitted across multiple paths. 5 // A map manages packets which are transmitted across multiple paths.
6 // For example, a packet is originally transmitted on path 1 with packet number 6 // For example, a packet is originally transmitted on path 1 with packet number
7 // 1. Then this packet is retransmitted on path 2 with packet number 1. (1, 1) 7 // 1. Then this packet is retransmitted on path 2 with packet number 1. (1, 1)
8 // and (2, 1) are inserted into this map. Suppose (2, 1) is detected lost and 8 // and (2, 1) are inserted into this map. Suppose (2, 1) is detected lost and
9 // gets retransmitted on path 2 with packet 2. (2, 2) will not be inserted 9 // gets retransmitted on path 2 with packet 2. (2, 2) will not be inserted
10 // because this transmission does not "across" path compared to (2, 1). 10 // because this transmission does not "across" path compared to (2, 1).
11 11
12 #ifndef NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_ 12 #ifndef NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_
13 #define NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_ 13 #define NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_
14 14
15 #include <deque> 15 #include <deque>
16 #include <unordered_map> 16 #include <unordered_map>
17 17
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "net/base/net_export.h" 19 #include "net/base/net_export.h"
20 #include "net/quic/core/quic_protocol.h" 20 #include "net/quic/core/quic_packets.h"
21 #include "net/quic/core/quic_utils.h" 21 #include "net/quic/core/quic_utils.h"
22 22
23 namespace net { 23 namespace net {
24 24
25 typedef std::pair<QuicPathId, QuicPacketNumber> QuicPathIdPacketNumber; 25 typedef std::pair<QuicPathId, QuicPacketNumber> QuicPathIdPacketNumber;
26 26
27 class NET_EXPORT_PRIVATE QuicMultipathTransmissionsMap { 27 class NET_EXPORT_PRIVATE QuicMultipathTransmissionsMap {
28 public: 28 public:
29 struct QuicPathIdPacketNumberHash { 29 struct QuicPathIdPacketNumberHash {
30 size_t operator()(std::pair<QuicPathId, QuicPacketNumber> value) const { 30 size_t operator()(std::pair<QuicPathId, QuicPacketNumber> value) const {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // packet has been transmitted as (1, 1) and (2, 1), two entries are added 65 // packet has been transmitted as (1, 1) and (2, 1), two entries are added
66 // to this map and both values point to the same list: {(1, 1), (2, 1)}. 66 // to this map and both values point to the same list: {(1, 1), (2, 1)}.
67 // The MultipathTransmissionsList is owned by the transmission which is 67 // The MultipathTransmissionsList is owned by the transmission which is
68 // received first (on any path). 68 // received first (on any path).
69 MultipathTransmissionsMap transmission_map_; 69 MultipathTransmissionsMap transmission_map_;
70 }; 70 };
71 71
72 } // namespace net 72 } // namespace net
73 73
74 #endif // NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_ 74 #endif // NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_multipath_sent_packet_manager_test.cc ('k') | net/quic/core/quic_packet_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698