| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 class NET_EXPORT_PRIVATE DelegateInterface { | 70 class NET_EXPORT_PRIVATE DelegateInterface { |
| 71 public: | 71 public: |
| 72 virtual ~DelegateInterface() {} | 72 virtual ~DelegateInterface() {} |
| 73 virtual bool ShouldGeneratePacket(TransmissionType transmission_type, | 73 virtual bool ShouldGeneratePacket(TransmissionType transmission_type, |
| 74 HasRetransmittableData retransmittable, | 74 HasRetransmittableData retransmittable, |
| 75 IsHandshake handshake) = 0; | 75 IsHandshake handshake) = 0; |
| 76 virtual QuicAckFrame* CreateAckFrame() = 0; | 76 virtual QuicAckFrame* CreateAckFrame() = 0; |
| 77 virtual QuicCongestionFeedbackFrame* CreateFeedbackFrame() = 0; | 77 virtual QuicCongestionFeedbackFrame* CreateFeedbackFrame() = 0; |
| 78 virtual QuicStopWaitingFrame* CreateStopWaitingFrame() = 0; | 78 virtual QuicStopWaitingFrame* CreateStopWaitingFrame() = 0; |
| 79 // Takes ownership of |packet.packet| and |packet.retransmittable_frames|. | 79 // Takes ownership of |packet.packet| and |packet.retransmittable_frames|. |
| 80 virtual bool OnSerializedPacket(const SerializedPacket& packet) = 0; | 80 virtual void OnSerializedPacket(const SerializedPacket& packet) = 0; |
| 81 virtual void CloseConnection(QuicErrorCode error, bool from_peer) = 0; | 81 virtual void CloseConnection(QuicErrorCode error, bool from_peer) = 0; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 // Interface which gets callbacks from the QuicPacketGenerator at interesting | 84 // Interface which gets callbacks from the QuicPacketGenerator at interesting |
| 85 // points. Implementations must not mutate the state of the generator | 85 // points. Implementations must not mutate the state of the generator |
| 86 // as a result of these callbacks. | 86 // as a result of these callbacks. |
| 87 class NET_EXPORT_PRIVATE DebugDelegate { | 87 class NET_EXPORT_PRIVATE DebugDelegate { |
| 88 public: | 88 public: |
| 89 virtual ~DebugDelegate() {} | 89 virtual ~DebugDelegate() {} |
| 90 | 90 |
| (...skipping 147 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 |