| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // Set the minimum number of bytes for the connection id length; | 170 // Set the minimum number of bytes for the connection id length; |
| 171 void SetConnectionIdLength(uint32 length); | 171 void SetConnectionIdLength(uint32 length); |
| 172 | 172 |
| 173 // Sets the encryption level that will be applied to new packets. | 173 // Sets the encryption level that will be applied to new packets. |
| 174 void set_encryption_level(EncryptionLevel level); | 174 void set_encryption_level(EncryptionLevel level); |
| 175 | 175 |
| 176 // 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 |
| 177 // created. | 177 // created. |
| 178 QuicPacketSequenceNumber sequence_number() const; | 178 QuicPacketSequenceNumber sequence_number() const; |
| 179 | 179 |
| 180 size_t max_packet_length() const; | 180 QuicByteCount max_packet_length() const; |
| 181 | 181 |
| 182 void set_max_packet_length(size_t length); | 182 void set_max_packet_length(QuicByteCount length); |
| 183 | 183 |
| 184 void set_debug_delegate(DebugDelegate* debug_delegate) { | 184 void set_debug_delegate(DebugDelegate* debug_delegate) { |
| 185 debug_delegate_ = debug_delegate; | 185 debug_delegate_ = debug_delegate; |
| 186 } | 186 } |
| 187 | 187 |
| 188 private: | 188 private: |
| 189 friend class test::QuicPacketGeneratorPeer; | 189 friend class test::QuicPacketGeneratorPeer; |
| 190 | 190 |
| 191 // Turn on FEC protection for subsequent packets in the generator. | 191 // Turn on FEC protection for subsequent packets in the generator. |
| 192 // If no FEC group is currently open in the creator, this method flushes any | 192 // If no FEC group is currently open in the creator, this method flushes any |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 scoped_ptr<QuicAckFrame> pending_ack_frame_; | 241 scoped_ptr<QuicAckFrame> pending_ack_frame_; |
| 242 scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_; | 242 scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_; |
| 243 scoped_ptr<QuicStopWaitingFrame> pending_stop_waiting_frame_; | 243 scoped_ptr<QuicStopWaitingFrame> pending_stop_waiting_frame_; |
| 244 | 244 |
| 245 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); | 245 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); |
| 246 }; | 246 }; |
| 247 | 247 |
| 248 } // namespace net | 248 } // namespace net |
| 249 | 249 |
| 250 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ | 250 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ |
| OLD | NEW |