Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: net/quic/quic_packet_generator.h

Issue 15937012: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small bug fixes Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 QuicConsumedData ConsumeData(QuicStreamId id, 80 QuicConsumedData ConsumeData(QuicStreamId id,
81 base::StringPiece data, 81 base::StringPiece data,
82 QuicStreamOffset offset, 82 QuicStreamOffset offset,
83 bool fin); 83 bool fin);
84 84
85 // Disables flushing. 85 // Disables flushing.
86 void StartBatchOperations(); 86 void StartBatchOperations();
87 // Enables flushing and flushes queued data. 87 // Enables flushing and flushes queued data.
88 void FinishBatchOperations(); 88 void FinishBatchOperations();
89 89
90 bool HasQueuedData() const; 90 bool HasQueuedFrames() const;
91 91
92 private: 92 private:
93 void SendQueuedData(); 93 void SendQueuedFrames();
94 94
95 bool HasPendingData() const; 95 bool HasPendingFrames() const;
96 bool AddNextPendingFrame(); 96 bool AddNextPendingFrame();
97 void SerializeAndSendPacket(); 97 void SerializeAndSendPacket();
98 98
99 DelegateInterface* delegate_; 99 DelegateInterface* delegate_;
100 100
101 QuicPacketCreator* packet_creator_; 101 QuicPacketCreator* packet_creator_;
102 QuicFrames queued_control_frames_; 102 QuicFrames queued_control_frames_;
103 bool should_flush_; 103 bool should_flush_;
104 bool should_send_ack_; 104 bool should_send_ack_;
105 scoped_ptr<QuicAckFrame> pending_ack_frame_; 105 scoped_ptr<QuicAckFrame> pending_ack_frame_;
106 scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_; 106 scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_;
107 bool should_send_feedback_; 107 bool should_send_feedback_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); 109 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator);
110 }; 110 };
111 111
112 } // namespace net 112 } // namespace net
113 113
114 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ 114 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698