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

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

Issue 1497113003: Add a queued_data_bytes() method to ReliableQuicStream. Not used outside of tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@108727610
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | net/quic/reliable_quic_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // The base class for client/server reliable streams. 5 // The base class for client/server reliable streams.
6 6
7 // It does not contain the entire interface needed by an application to interact 7 // It does not contain the entire interface needed by an application to interact
8 // with a QUIC stream. Some parts of the interface must be obtained by 8 // with a QUIC stream. Some parts of the interface must be obtained by
9 // accessing the owning session object. A subclass of ReliableQuicStream 9 // accessing the owning session object. A subclass of ReliableQuicStream
10 // connects the object and the application that generates and consumes the data 10 // connects the object and the application that generates and consumes the data
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 bool reading_stopped() const { 106 bool reading_stopped() const {
107 return sequencer_.ignore_read_data() || read_side_closed_; 107 return sequencer_.ignore_read_data() || read_side_closed_;
108 } 108 }
109 bool write_side_closed() const { return write_side_closed_; } 109 bool write_side_closed() const { return write_side_closed_; }
110 110
111 bool rst_received() { return rst_received_; } 111 bool rst_received() { return rst_received_; }
112 bool rst_sent() { return rst_sent_; } 112 bool rst_sent() { return rst_sent_; }
113 bool fin_received() { return fin_received_; } 113 bool fin_received() { return fin_received_; }
114 bool fin_sent() { return fin_sent_; } 114 bool fin_sent() { return fin_sent_; }
115 115
116 uint64 queued_data_bytes() const { return queued_data_bytes_; }
117
116 uint64 stream_bytes_read() const { return stream_bytes_read_; } 118 uint64 stream_bytes_read() const { return stream_bytes_read_; }
117 uint64 stream_bytes_written() const { return stream_bytes_written_; } 119 uint64 stream_bytes_written() const { return stream_bytes_written_; }
118 120
119 void set_fin_sent(bool fin_sent) { fin_sent_ = fin_sent; } 121 void set_fin_sent(bool fin_sent) { fin_sent_ = fin_sent; }
120 void set_fin_received(bool fin_received) { fin_received_ = fin_received; } 122 void set_fin_received(bool fin_received) { fin_received_ = fin_received; }
121 void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; } 123 void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; }
122 124
123 void set_fec_policy(FecPolicy fec_policy) { fec_policy_ = fec_policy; } 125 void set_fec_policy(FecPolicy fec_policy) { fec_policy_ = fec_policy; }
124 FecPolicy fec_policy() const { return fec_policy_; } 126 FecPolicy fec_policy() const { return fec_policy_; }
125 127
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 scoped_refptr<QuicAckListenerInterface> ack_listener; 241 scoped_refptr<QuicAckListenerInterface> ack_listener;
240 }; 242 };
241 243
242 // Calls MaybeSendBlocked on the stream's flow controller and the connection 244 // Calls MaybeSendBlocked on the stream's flow controller and the connection
243 // level flow controller. If the stream is flow control blocked by the 245 // level flow controller. If the stream is flow control blocked by the
244 // connection-level flow controller but not by the stream-level flow 246 // connection-level flow controller but not by the stream-level flow
245 // controller, marks this stream as connection-level write blocked. 247 // controller, marks this stream as connection-level write blocked.
246 void MaybeSendBlocked(); 248 void MaybeSendBlocked();
247 249
248 std::list<PendingData> queued_data_; 250 std::list<PendingData> queued_data_;
251 // How many bytes are queued?
252 uint64 queued_data_bytes_;
249 253
250 QuicStreamSequencer sequencer_; 254 QuicStreamSequencer sequencer_;
251 QuicStreamId id_; 255 QuicStreamId id_;
252 // Pointer to the owning QuicSession object. 256 // Pointer to the owning QuicSession object.
253 QuicSession* session_; 257 QuicSession* session_;
254 // Bytes read and written refer to payload bytes only: they do not include 258 // Bytes read and written refer to payload bytes only: they do not include
255 // framing, encryption overhead etc. 259 // framing, encryption overhead etc.
256 uint64 stream_bytes_read_; 260 uint64 stream_bytes_read_;
257 uint64 stream_bytes_written_; 261 uint64 stream_bytes_written_;
258 262
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 // connection level flow control limits (but are stream level flow control 307 // connection level flow control limits (but are stream level flow control
304 // limited). 308 // limited).
305 bool stream_contributes_to_connection_flow_control_; 309 bool stream_contributes_to_connection_flow_control_;
306 310
307 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); 311 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream);
308 }; 312 };
309 313
310 } // namespace net 314 } // namespace net
311 315
312 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ 316 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/reliable_quic_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698