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

Side by Side Diff: net/quic/core/quic_packet_generator.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
« no previous file with comments | « net/quic/core/quic_packet_creator_test.cc ('k') | net/quic/core/quic_packet_generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Responsible for generating packets on behalf of a QuicConnection. 5 // Responsible for generating packets on behalf of a QuicConnection.
6 // Packets are serialized just-in-time. Control frames are queued. 6 // Packets are serialized just-in-time. Control frames are queued.
7 // Ack and Feedback frames will be requested from the Connection 7 // Ack and Feedback frames will be requested from the Connection
8 // just-in-time. When a packet needs to be sent, the Generator 8 // just-in-time. When a packet needs to be sent, the Generator
9 // will serialize a packet and pass it to QuicConnection::SendOrQueuePacket() 9 // will serialize a packet and pass it to QuicConnection::SendOrQueuePacket()
10 // 10 //
(...skipping 30 matching lines...) Expand all
41 #define NET_QUIC_QUIC_PACKET_GENERATOR_H_ 41 #define NET_QUIC_QUIC_PACKET_GENERATOR_H_
42 42
43 #include <stddef.h> 43 #include <stddef.h>
44 #include <stdint.h> 44 #include <stdint.h>
45 45
46 #include <list> 46 #include <list>
47 47
48 #include "base/macros.h" 48 #include "base/macros.h"
49 #include "net/base/net_export.h" 49 #include "net/base/net_export.h"
50 #include "net/quic/core/quic_packet_creator.h" 50 #include "net/quic/core/quic_packet_creator.h"
51 #include "net/quic/core/quic_pending_retransmission.h"
51 #include "net/quic/core/quic_sent_packet_manager.h" 52 #include "net/quic/core/quic_sent_packet_manager.h"
52 #include "net/quic/core/quic_types.h" 53 #include "net/quic/core/quic_types.h"
53 54
54 namespace net { 55 namespace net {
55 56
56 namespace test { 57 namespace test {
57 class QuicPacketGeneratorPeer; 58 class QuicPacketGeneratorPeer;
58 } // namespace test 59 } // namespace test
59 60
60 class NET_EXPORT_PRIVATE QuicPacketGenerator { 61 class NET_EXPORT_PRIVATE QuicPacketGenerator {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // header of packets encrypted at the initial encryption level. Should only 134 // header of packets encrypted at the initial encryption level. Should only
134 // be called by servers. 135 // be called by servers.
135 void SetDiversificationNonce(const DiversificationNonce& nonce); 136 void SetDiversificationNonce(const DiversificationNonce& nonce);
136 137
137 // Creates a version negotiation packet which supports |supported_versions|. 138 // Creates a version negotiation packet which supports |supported_versions|.
138 std::unique_ptr<QuicEncryptedPacket> SerializeVersionNegotiationPacket( 139 std::unique_ptr<QuicEncryptedPacket> SerializeVersionNegotiationPacket(
139 const QuicVersionVector& supported_versions); 140 const QuicVersionVector& supported_versions);
140 141
141 // Re-serializes frames with the original packet's packet number length. 142 // Re-serializes frames with the original packet's packet number length.
142 // Used for retransmitting packets to ensure they aren't too long. 143 // Used for retransmitting packets to ensure they aren't too long.
143 void ReserializeAllFrames(const PendingRetransmission& retransmission, 144 void ReserializeAllFrames(const QuicPendingRetransmission& retransmission,
144 char* buffer, 145 char* buffer,
145 size_t buffer_len); 146 size_t buffer_len);
146 147
147 // Update the packet number length to use in future packets as soon as it 148 // Update the packet number length to use in future packets as soon as it
148 // can be safely changed. 149 // can be safely changed.
149 void UpdateSequenceNumberLength(QuicPacketNumber least_packet_awaited_by_peer, 150 void UpdateSequenceNumberLength(QuicPacketNumber least_packet_awaited_by_peer,
150 QuicPacketCount max_packets_in_flight); 151 QuicPacketCount max_packets_in_flight);
151 152
152 // Set the minimum number of bytes for the connection id length; 153 // Set the minimum number of bytes for the connection id length;
153 void SetConnectionIdLength(uint32_t length); 154 void SetConnectionIdLength(uint32_t length);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // are referenced elsewhere so that they can later be (optionally) 211 // are referenced elsewhere so that they can later be (optionally)
211 // retransmitted. 212 // retransmitted.
212 QuicStopWaitingFrame pending_stop_waiting_frame_; 213 QuicStopWaitingFrame pending_stop_waiting_frame_;
213 214
214 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); 215 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator);
215 }; 216 };
216 217
217 } // namespace net 218 } // namespace net
218 219
219 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ 220 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_packet_creator_test.cc ('k') | net/quic/core/quic_packet_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698