| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 // Interface which gets callbacks from the QuicPacketGenerator at interesting | 78 // Interface which gets callbacks from the QuicPacketGenerator at interesting |
| 79 // points. Implementations must not mutate the state of the generator | 79 // points. Implementations must not mutate the state of the generator |
| 80 // as a result of these callbacks. | 80 // as a result of these callbacks. |
| 81 class NET_EXPORT_PRIVATE DebugDelegateInterface { | 81 class NET_EXPORT_PRIVATE DebugDelegateInterface { |
| 82 public: | 82 public: |
| 83 virtual ~DebugDelegateInterface() {} | 83 virtual ~DebugDelegateInterface() {} |
| 84 | 84 |
| 85 // Called when a frame has been added to the current packet. | 85 // Called when a frame has been added to the current packet. |
| 86 virtual void OnFrameAddedToPacket(const QuicFrame& frame) = 0; | 86 virtual void OnFrameAddedToPacket(const QuicFrame& frame) {} |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 QuicPacketGenerator(DelegateInterface* delegate, | 89 QuicPacketGenerator(DelegateInterface* delegate, |
| 90 DebugDelegateInterface* debug_delegate, | 90 DebugDelegateInterface* debug_delegate, |
| 91 QuicPacketCreator* creator); | 91 QuicPacketCreator* creator); |
| 92 | 92 |
| 93 virtual ~QuicPacketGenerator(); | 93 virtual ~QuicPacketGenerator(); |
| 94 | 94 |
| 95 // Indicates that an ACK frame should be sent. If |also_send_feedback| is | 95 // Indicates that an ACK frame should be sent. If |also_send_feedback| is |
| 96 // true, then it also indicates a CONGESTION_FEEDBACK frame should be sent. | 96 // true, then it also indicates a CONGESTION_FEEDBACK frame should be sent. |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 scoped_ptr<QuicAckFrame> pending_ack_frame_; | 171 scoped_ptr<QuicAckFrame> pending_ack_frame_; |
| 172 scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_; | 172 scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_; |
| 173 scoped_ptr<QuicStopWaitingFrame> pending_stop_waiting_frame_; | 173 scoped_ptr<QuicStopWaitingFrame> pending_stop_waiting_frame_; |
| 174 | 174 |
| 175 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); | 175 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 } // namespace net | 178 } // namespace net |
| 179 | 179 |
| 180 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ | 180 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ |
| OLD | NEW |