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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 void SetShouldSendStopWaiting(); | 115 void SetShouldSendStopWaiting(); |
116 | 116 |
117 void AddControlFrame(const QuicFrame& frame); | 117 void AddControlFrame(const QuicFrame& frame); |
118 | 118 |
119 // Given some data, may consume part or all of it and pass it to the | 119 // Given some data, may consume part or all of it and pass it to the |
120 // packet creator to be serialized into packets. If not in batch | 120 // packet creator to be serialized into packets. If not in batch |
121 // mode, these packets will also be sent during this call. Also | 121 // mode, these packets will also be sent during this call. Also |
122 // attaches a QuicAckNotifier to any created stream frames, which | 122 // attaches a QuicAckNotifier to any created stream frames, which |
123 // will be called once the frame is ACKed by the peer. The | 123 // will be called once the frame is ACKed by the peer. The |
124 // QuicAckNotifier is owned by the QuicConnection. |notifier| may | 124 // QuicAckNotifier is owned by the QuicConnection. |notifier| may |
125 // be NULL. | 125 // be nullptr. |
126 QuicConsumedData ConsumeData(QuicStreamId id, | 126 QuicConsumedData ConsumeData(QuicStreamId id, |
127 const IOVector& data, | 127 const IOVector& data, |
128 QuicStreamOffset offset, | 128 QuicStreamOffset offset, |
129 bool fin, | 129 bool fin, |
130 FecProtection fec_protection, | 130 FecProtection fec_protection, |
131 QuicAckNotifier* notifier); | 131 QuicAckNotifier* notifier); |
132 | 132 |
133 // Indicates whether batch mode is currently enabled. | 133 // Indicates whether batch mode is currently enabled. |
134 bool InBatchMode(); | 134 bool InBatchMode(); |
135 // Disables flushing. | 135 // Disables flushing. |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 scoped_ptr<QuicAckFrame> pending_ack_frame_; | 238 scoped_ptr<QuicAckFrame> pending_ack_frame_; |
239 scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_; | 239 scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_; |
240 scoped_ptr<QuicStopWaitingFrame> pending_stop_waiting_frame_; | 240 scoped_ptr<QuicStopWaitingFrame> pending_stop_waiting_frame_; |
241 | 241 |
242 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); | 242 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); |
243 }; | 243 }; |
244 | 244 |
245 } // namespace net | 245 } // namespace net |
246 | 246 |
247 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ | 247 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ |
OLD | NEW |