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

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

Issue 76723002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compilation error Created 7 years, 1 month 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
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | 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 #ifndef NET_QUIC_RELIABLE_QUIC_STREAM_H_ 7 #ifndef NET_QUIC_RELIABLE_QUIC_STREAM_H_
8 #define NET_QUIC_RELIABLE_QUIC_STREAM_H_ 8 #define NET_QUIC_RELIABLE_QUIC_STREAM_H_
9 9
10 #include <sys/types.h> 10 #include <sys/types.h>
11 11
12 #include <list> 12 #include <list>
13 13
14 #include "base/strings/string_piece.h" 14 #include "base/strings/string_piece.h"
15 #include "net/base/iovec.h" 15 #include "net/base/iovec.h"
16 #include "net/base/net_export.h" 16 #include "net/base/net_export.h"
17 #include "net/quic/quic_ack_notifier.h"
17 #include "net/quic/quic_spdy_compressor.h" 18 #include "net/quic/quic_spdy_compressor.h"
18 #include "net/quic/quic_spdy_decompressor.h" 19 #include "net/quic/quic_spdy_decompressor.h"
19 #include "net/quic/quic_stream_sequencer.h" 20 #include "net/quic/quic_stream_sequencer.h"
20 21
21 namespace net { 22 namespace net {
22 23
23 namespace test { 24 namespace test {
24 class ReliableQuicStreamPeer; 25 class ReliableQuicStreamPeer;
25 } // namespace test 26 } // namespace test
26 27
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Returns (data.size(), true) as it always consumed all data: it returns for 166 // Returns (data.size(), true) as it always consumed all data: it returns for
166 // convenience to have the same return type as WriteDataInternal. 167 // convenience to have the same return type as WriteDataInternal.
167 QuicConsumedData WriteOrBuffer(base::StringPiece data, bool fin); 168 QuicConsumedData WriteOrBuffer(base::StringPiece data, bool fin);
168 169
169 // Sends as much of 'data' to the connection as the connection will consume. 170 // Sends as much of 'data' to the connection as the connection will consume.
170 // Returns the number of bytes consumed by the connection. 171 // Returns the number of bytes consumed by the connection.
171 QuicConsumedData WriteDataInternal(base::StringPiece data, bool fin); 172 QuicConsumedData WriteDataInternal(base::StringPiece data, bool fin);
172 173
173 // Sends as many bytes in the first |count| buffers of |iov| to the connection 174 // Sends as many bytes in the first |count| buffers of |iov| to the connection
174 // as the connection will consume. 175 // as the connection will consume.
176 // If |ack_notifier_delegate| is provided, then it will be notified once all
177 // the ACKs for this write have been received.
175 // Returns the number of bytes consumed by the connection. 178 // Returns the number of bytes consumed by the connection.
176 QuicConsumedData WritevDataInternal(const struct iovec* iov, 179 QuicConsumedData WritevDataInternal(
177 int iov_count, 180 const struct iovec* iov,
178 bool fin); 181 int iov_count,
182 bool fin,
183 QuicAckNotifier::DelegateInterface* ack_notifier_delegate);
179 184
180 private: 185 private:
181 friend class test::ReliableQuicStreamPeer; 186 friend class test::ReliableQuicStreamPeer;
182 friend class QuicStreamUtils; 187 friend class QuicStreamUtils;
183 188
184 uint32 StripPriorityAndHeaderId(const char* data, uint32 data_len); 189 uint32 StripPriorityAndHeaderId(const char* data, uint32 data_len);
185 190
186 std::list<string> queued_data_; 191 std::list<string> queued_data_;
187 192
188 QuicStreamSequencer sequencer_; 193 QuicStreamSequencer sequencer_;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 bool fin_buffered_; 232 bool fin_buffered_;
228 bool fin_sent_; 233 bool fin_sent_;
229 234
230 // True if the session this stream is running under is a server session. 235 // True if the session this stream is running under is a server session.
231 bool is_server_; 236 bool is_server_;
232 }; 237 };
233 238
234 } // namespace net 239 } // namespace net
235 240
236 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ 241 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/reliable_quic_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698