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

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

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 4 years, 12 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_packet_creator_test.cc ('k') | net/quic/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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // mode, we should probably set a timer so that several independent 46 // mode, we should probably set a timer so that several independent
47 // operations can be grouped into the same FEC group. 47 // operations can be grouped into the same FEC group.
48 // 48 //
49 // When an FEC packet is generated, it will be send to the Delegate, 49 // When an FEC packet is generated, it will be send to the Delegate,
50 // even if the Delegate has become unwritable after handling the 50 // even if the Delegate has become unwritable after handling the
51 // data packet immediately proceeding the FEC packet. 51 // data packet immediately proceeding the FEC packet.
52 52
53 #ifndef NET_QUIC_QUIC_PACKET_GENERATOR_H_ 53 #ifndef NET_QUIC_QUIC_PACKET_GENERATOR_H_
54 #define NET_QUIC_QUIC_PACKET_GENERATOR_H_ 54 #define NET_QUIC_QUIC_PACKET_GENERATOR_H_
55 55
56 #include <stddef.h>
57 #include <stdint.h>
58
56 #include <list> 59 #include <list>
57 60
61 #include "base/macros.h"
58 #include "net/quic/quic_packet_creator.h" 62 #include "net/quic/quic_packet_creator.h"
59 #include "net/quic/quic_sent_packet_manager.h" 63 #include "net/quic/quic_sent_packet_manager.h"
60 #include "net/quic/quic_types.h" 64 #include "net/quic/quic_types.h"
61 65
62 namespace net { 66 namespace net {
63 67
64 namespace test { 68 namespace test {
65 class QuicPacketGeneratorPeer; 69 class QuicPacketGeneratorPeer;
66 } // namespace test 70 } // namespace test
67 71
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 QuicPacketNumberLength original_length, 153 QuicPacketNumberLength original_length,
150 char* buffer, 154 char* buffer,
151 size_t buffer_len); 155 size_t buffer_len);
152 156
153 // Update the packet number length to use in future packets as soon as it 157 // Update the packet number length to use in future packets as soon as it
154 // can be safely changed. 158 // can be safely changed.
155 void UpdateSequenceNumberLength(QuicPacketNumber least_packet_awaited_by_peer, 159 void UpdateSequenceNumberLength(QuicPacketNumber least_packet_awaited_by_peer,
156 QuicPacketCount max_packets_in_flight); 160 QuicPacketCount max_packets_in_flight);
157 161
158 // Set the minimum number of bytes for the connection id length; 162 // Set the minimum number of bytes for the connection id length;
159 void SetConnectionIdLength(uint32 length); 163 void SetConnectionIdLength(uint32_t length);
160 164
161 // Called when the FEC alarm fires. 165 // Called when the FEC alarm fires.
162 void OnFecTimeout(); 166 void OnFecTimeout();
163 167
164 // Called after sending |packet_number| to determine whether an FEC alarm 168 // Called after sending |packet_number| to determine whether an FEC alarm
165 // should be set for sending out an FEC packet. Returns a positive and finite 169 // should be set for sending out an FEC packet. Returns a positive and finite
166 // timeout if an FEC alarm should be set, and infinite if no alarm should be 170 // timeout if an FEC alarm should be set, and infinite if no alarm should be
167 // set. OnFecTimeout should be called to send the FEC packet when the alarm 171 // set. OnFecTimeout should be called to send the FEC packet when the alarm
168 // fires. 172 // fires.
169 QuicTime::Delta GetFecTimeout(QuicPacketNumber packet_number); 173 QuicTime::Delta GetFecTimeout(QuicPacketNumber packet_number);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // the maximum size we are actually using now, if we are in the middle of the 247 // the maximum size we are actually using now, if we are in the middle of the
244 // packet. 248 // packet.
245 QuicByteCount max_packet_length_; 249 QuicByteCount max_packet_length_;
246 250
247 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); 251 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator);
248 }; 252 };
249 253
250 } // namespace net 254 } // namespace net
251 255
252 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ 256 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_
OLDNEW
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698