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

Side by Side Diff: net/quic/core/quic_stream.h

Issue 2825083003: Landing Recent QUIC changes until Mon Apr 17 2017 (Closed)
Patch Set: Format Created 3 years, 8 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
« no previous file with comments | « net/quic/core/quic_spdy_stream.h ('k') | net/quic/core/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 QUIC streams. 5 // The base class for client/server QUIC 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 QuicStream 9 // accessing the owning session object. A subclass of QuicStream
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 // Sends as much of 'data' to the connection as the connection will consume, 180 // Sends as much of 'data' to the connection as the connection will consume,
181 // and then buffers any remaining data in queued_data_. 181 // and then buffers any remaining data in queued_data_.
182 // If fin is true: if it is immediately passed on to the session, 182 // If fin is true: if it is immediately passed on to the session,
183 // write_side_closed() becomes true, otherwise fin_buffered_ becomes true. 183 // write_side_closed() becomes true, otherwise fin_buffered_ becomes true.
184 void WriteOrBufferData( 184 void WriteOrBufferData(
185 QuicStringPiece data, 185 QuicStringPiece data,
186 bool fin, 186 bool fin,
187 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener); 187 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener);
188 188
189 // Adds random padding after the fin is consumed for this stream.
190 void AddRandomPaddingAfterFin();
191
189 protected: 192 protected:
190 // Sends as many bytes in the first |count| buffers of |iov| to the connection 193 // Sends as many bytes in the first |count| buffers of |iov| to the connection
191 // as the connection will consume. 194 // as the connection will consume.
192 // If |ack_listener| is provided, then it will be notified once all 195 // If |ack_listener| is provided, then it will be notified once all
193 // the ACKs for this write have been received. 196 // the ACKs for this write have been received.
194 // Returns the number of bytes consumed by the connection. 197 // Returns the number of bytes consumed by the connection.
195 QuicConsumedData WritevData( 198 QuicConsumedData WritevData(
196 const struct iovec* iov, 199 const struct iovec* iov,
197 int iov_count, 200 int iov_count,
198 bool fin, 201 bool fin,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 313
311 // Special streams, such as the crypto and headers streams, do not respect 314 // Special streams, such as the crypto and headers streams, do not respect
312 // connection level flow control limits (but are stream level flow control 315 // connection level flow control limits (but are stream level flow control
313 // limited). 316 // limited).
314 bool stream_contributes_to_connection_flow_control_; 317 bool stream_contributes_to_connection_flow_control_;
315 318
316 // A counter incremented when OnCanWrite() is called and no progress is made. 319 // A counter incremented when OnCanWrite() is called and no progress is made.
317 // For debugging only. 320 // For debugging only.
318 size_t busy_counter_; 321 size_t busy_counter_;
319 322
323 // Indicates whether paddings will be added after the fin is consumed for this
324 // stream.
325 bool add_random_padding_after_fin_;
326
320 DISALLOW_COPY_AND_ASSIGN(QuicStream); 327 DISALLOW_COPY_AND_ASSIGN(QuicStream);
321 }; 328 };
322 329
323 } // namespace net 330 } // namespace net
324 331
325 #endif // NET_QUIC_CORE_QUIC_STREAM_H_ 332 #endif // NET_QUIC_CORE_QUIC_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_spdy_stream.h ('k') | net/quic/core/quic_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698