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

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

Issue 2609493002: Landing Recent QUIC changes until 05:15 PM, Dec 24, 2016 UTC (Closed)
Patch Set: Fix random. Created 3 years, 11 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.cc ('k') | net/quic/test_tools/quic_headers_stream_peer.h » ('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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // OnDataAvailable(). 172 // OnDataAvailable().
173 // When the FIN is received, the stream will be notified automatically (via 173 // When the FIN is received, the stream will be notified automatically (via
174 // OnFinRead()) (which may happen during the call of StopReading()). 174 // OnFinRead()) (which may happen during the call of StopReading()).
175 // TODO(dworley): There should be machinery to send a RST_STREAM/NO_ERROR and 175 // TODO(dworley): There should be machinery to send a RST_STREAM/NO_ERROR and
176 // stop sending stream-level flow-control updates when this end sends FIN. 176 // stop sending stream-level flow-control updates when this end sends FIN.
177 virtual void StopReading(); 177 virtual void StopReading();
178 178
179 // Get peer IP of the lastest packet which connection is dealing/delt with. 179 // Get peer IP of the lastest packet which connection is dealing/delt with.
180 virtual const QuicSocketAddress& PeerAddressOfLatestPacket() const; 180 virtual const QuicSocketAddress& PeerAddressOfLatestPacket() const;
181 181
182 protected:
183 // Sends as much of 'data' to the connection as the connection will consume, 182 // Sends as much of 'data' to the connection as the connection will consume,
184 // and then buffers any remaining data in queued_data_. 183 // and then buffers any remaining data in queued_data_.
185 // If fin is true: if it is immediately passed on to the session, 184 // If fin is true: if it is immediately passed on to the session,
186 // write_side_closed() becomes true, otherwise fin_buffered_ becomes true. 185 // write_side_closed() becomes true, otherwise fin_buffered_ becomes true.
187 void WriteOrBufferData( 186 void WriteOrBufferData(
188 base::StringPiece data, 187 base::StringPiece data,
189 bool fin, 188 bool fin,
190 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener); 189 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener);
191 190
191 protected:
192 // Sends as many bytes in the first |count| buffers of |iov| to the connection 192 // Sends as many bytes in the first |count| buffers of |iov| to the connection
193 // as the connection will consume. 193 // as the connection will consume.
194 // If |ack_listener| is provided, then it will be notified once all 194 // If |ack_listener| is provided, then it will be notified once all
195 // the ACKs for this write have been received. 195 // the ACKs for this write have been received.
196 // Returns the number of bytes consumed by the connection. 196 // Returns the number of bytes consumed by the connection.
197 QuicConsumedData WritevData( 197 QuicConsumedData WritevData(
198 const struct iovec* iov, 198 const struct iovec* iov,
199 int iov_count, 199 int iov_count,
200 bool fin, 200 bool fin,
201 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener); 201 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 // For debugging only, used for busy loop check. 318 // For debugging only, used for busy loop check.
319 size_t busy_counter_; 319 size_t busy_counter_;
320 320
321 DISALLOW_COPY_AND_ASSIGN(QuicStream); 321 DISALLOW_COPY_AND_ASSIGN(QuicStream);
322 }; 322 };
323 323
324 } // namespace net 324 } // namespace net
325 325
326 #endif // NET_QUIC_CORE_QUIC_STREAM_H_ 326 #endif // NET_QUIC_CORE_QUIC_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_spdy_stream.cc ('k') | net/quic/test_tools/quic_headers_stream_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698