| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 "base/containers/hash_tables.h" |
| 56 #include "net/quic/quic_ack_notifier.h" | 57 #include "net/quic/quic_ack_notifier.h" |
| 57 #include "net/quic/quic_packet_creator.h" | 58 #include "net/quic/quic_packet_creator.h" |
| 58 #include "net/quic/quic_sent_packet_manager.h" | 59 #include "net/quic/quic_sent_packet_manager.h" |
| 59 #include "net/quic/quic_types.h" | 60 #include "net/quic/quic_types.h" |
| 60 | 61 |
| 61 namespace net { | 62 namespace net { |
| 62 | 63 |
| 63 namespace test { | 64 namespace test { |
| 64 class QuicPacketGeneratorPeer; | 65 class QuicPacketGeneratorPeer; |
| 65 } // namespace test | 66 } // namespace test |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 bool should_send_feedback_; | 241 bool should_send_feedback_; |
| 241 bool should_send_stop_waiting_; | 242 bool should_send_stop_waiting_; |
| 242 // If we put a non-retransmittable frame (namley ack or feedback frame) in | 243 // If we put a non-retransmittable frame (namley ack or feedback frame) in |
| 243 // this packet, then we have to hold a reference to it until we flush (and | 244 // this packet, then we have to hold a reference to it until we flush (and |
| 244 // serialize it). Retransmittable frames are referenced elsewhere so that they | 245 // serialize it). Retransmittable frames are referenced elsewhere so that they |
| 245 // can later be (optionally) retransmitted. | 246 // can later be (optionally) retransmitted. |
| 246 scoped_ptr<QuicAckFrame> pending_ack_frame_; | 247 scoped_ptr<QuicAckFrame> pending_ack_frame_; |
| 247 scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_; | 248 scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_; |
| 248 scoped_ptr<QuicStopWaitingFrame> pending_stop_waiting_frame_; | 249 scoped_ptr<QuicStopWaitingFrame> pending_stop_waiting_frame_; |
| 249 | 250 |
| 251 // Stores notifiers that should be attached to the next serialized packet. |
| 252 base::hash_set<QuicAckNotifier*> ack_notifiers_; |
| 253 |
| 250 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); | 254 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); |
| 251 }; | 255 }; |
| 252 | 256 |
| 253 } // namespace net | 257 } // namespace net |
| 254 | 258 |
| 255 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ | 259 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ |
| OLD | NEW |