OLD | NEW |
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 // created. | 173 // created. |
174 QuicPacketNumber packet_number() const; | 174 QuicPacketNumber packet_number() const; |
175 | 175 |
176 // Returns the maximum length a current packet can actually have. | 176 // Returns the maximum length a current packet can actually have. |
177 QuicByteCount GetCurrentMaxPacketLength() const; | 177 QuicByteCount GetCurrentMaxPacketLength() const; |
178 | 178 |
179 // Set maximum packet length in the creator immediately. May not be called | 179 // Set maximum packet length in the creator immediately. May not be called |
180 // when there are frames queued in the creator. | 180 // when there are frames queued in the creator. |
181 void SetMaxPacketLength(QuicByteCount length); | 181 void SetMaxPacketLength(QuicByteCount length); |
182 | 182 |
| 183 // Let delegate save stream data in creator. |
| 184 void SetDelegateSavesData(bool delegate_saves_data); |
| 185 |
183 void set_debug_delegate(QuicPacketCreator::DebugDelegate* debug_delegate) { | 186 void set_debug_delegate(QuicPacketCreator::DebugDelegate* debug_delegate) { |
184 packet_creator_.set_debug_delegate(debug_delegate); | 187 packet_creator_.set_debug_delegate(debug_delegate); |
185 } | 188 } |
186 | 189 |
187 bool latched_flag_no_stop_waiting_frames() const { | 190 bool latched_flag_no_stop_waiting_frames() const { |
188 return packet_creator_.latched_flag_no_stop_waiting_frames(); | 191 return packet_creator_.latched_flag_no_stop_waiting_frames(); |
189 } | 192 } |
190 | 193 |
191 private: | 194 private: |
192 friend class test::QuicPacketGeneratorPeer; | 195 friend class test::QuicPacketGeneratorPeer; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 QuicStopWaitingFrame pending_stop_waiting_frame_; | 232 QuicStopWaitingFrame pending_stop_waiting_frame_; |
230 | 233 |
231 QuicRandom* random_generator_; | 234 QuicRandom* random_generator_; |
232 | 235 |
233 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); | 236 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); |
234 }; | 237 }; |
235 | 238 |
236 } // namespace net | 239 } // namespace net |
237 | 240 |
238 #endif // NET_QUIC_CORE_QUIC_PACKET_GENERATOR_H_ | 241 #endif // NET_QUIC_CORE_QUIC_PACKET_GENERATOR_H_ |
OLD | NEW |