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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 SerializedPacket ReserializeAllFrames( | 160 SerializedPacket ReserializeAllFrames( |
161 const QuicFrames& frames, | 161 const QuicFrames& frames, |
162 QuicSequenceNumberLength original_length); | 162 QuicSequenceNumberLength original_length); |
163 | 163 |
164 // Update the sequence number length to use in future packets as soon as it | 164 // Update the sequence number length to use in future packets as soon as it |
165 // can be safely changed. | 165 // can be safely changed. |
166 void UpdateSequenceNumberLength( | 166 void UpdateSequenceNumberLength( |
167 QuicPacketSequenceNumber least_packet_awaited_by_peer, | 167 QuicPacketSequenceNumber least_packet_awaited_by_peer, |
168 QuicByteCount congestion_window); | 168 QuicByteCount congestion_window); |
169 | 169 |
| 170 // Set the minimum number of bytes for the connection id length; |
| 171 void SetConnectionIdLength(uint32 length); |
| 172 |
170 // Sets the encryption level that will be applied to new packets. | 173 // Sets the encryption level that will be applied to new packets. |
171 void set_encryption_level(EncryptionLevel level); | 174 void set_encryption_level(EncryptionLevel level); |
172 | 175 |
173 // Sequence number of the last created packet, or 0 if no packets have been | 176 // Sequence number of the last created packet, or 0 if no packets have been |
174 // created. | 177 // created. |
175 QuicPacketSequenceNumber sequence_number() const; | 178 QuicPacketSequenceNumber sequence_number() const; |
176 | 179 |
177 size_t max_packet_length() const; | 180 size_t max_packet_length() const; |
178 | 181 |
179 void set_max_packet_length(size_t length); | 182 void set_max_packet_length(size_t length); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 scoped_ptr<QuicAckFrame> pending_ack_frame_; | 241 scoped_ptr<QuicAckFrame> pending_ack_frame_; |
239 scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_; | 242 scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_; |
240 scoped_ptr<QuicStopWaitingFrame> pending_stop_waiting_frame_; | 243 scoped_ptr<QuicStopWaitingFrame> pending_stop_waiting_frame_; |
241 | 244 |
242 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); | 245 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); |
243 }; | 246 }; |
244 | 247 |
245 } // namespace net | 248 } // namespace net |
246 | 249 |
247 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ | 250 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ |
OLD | NEW |