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

Side by Side Diff: net/quic/test_tools/simulator/quic_endpoint.cc

Issue 2963763003: In QUIC, send data is copied to streams rather than frames. Protected by FLAGS_quic_reloadable_flag… (Closed)
Patch Set: Rebase Created 3 years, 5 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/test_tools/simulator/quic_endpoint.h ('k') | net/tools/quic/quic_dispatcher.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 #include "net/quic/test_tools/simulator/quic_endpoint.h" 5 #include "net/quic/test_tools/simulator/quic_endpoint.h"
6 6
7 #include "base/sha1.h" 7 #include "base/sha1.h"
8 #include "net/quic/core/crypto/crypto_handshake_message.h" 8 #include "net/quic/core/crypto/crypto_handshake_message.h"
9 #include "net/quic/core/crypto/crypto_protocol.h" 9 #include "net/quic/core/crypto/crypto_protocol.h"
10 #include "net/quic/platform/api/quic_ptr_util.h" 10 #include "net/quic/platform/api/quic_ptr_util.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 DCHECK(consumed_data.bytes_consumed <= transmission_size); 238 DCHECK(consumed_data.bytes_consumed <= transmission_size);
239 bytes_transferred_ += consumed_data.bytes_consumed; 239 bytes_transferred_ += consumed_data.bytes_consumed;
240 bytes_to_transfer_ -= consumed_data.bytes_consumed; 240 bytes_to_transfer_ -= consumed_data.bytes_consumed;
241 if (consumed_data.bytes_consumed != transmission_size) { 241 if (consumed_data.bytes_consumed != transmission_size) {
242 return; 242 return;
243 } 243 }
244 } 244 }
245 } 245 }
246 246
247 void QuicEndpoint::SaveStreamData(QuicStreamId id,
248 QuicIOVector iov,
249 size_t iov_offset,
250 QuicStreamOffset offset,
251 QuicByteCount data_length) {
252 producer_.SaveStreamData(id, iov, iov_offset, offset, data_length);
253 }
254
255 bool QuicEndpoint::WriteStreamData(QuicStreamId id,
256 QuicStreamOffset offset,
257 QuicByteCount data_length,
258 QuicDataWriter* writer) {
259 return producer_.WriteStreamData(id, offset, data_length, writer);
260 }
261
247 QuicEndpointMultiplexer::QuicEndpointMultiplexer( 262 QuicEndpointMultiplexer::QuicEndpointMultiplexer(
248 string name, 263 string name,
249 std::initializer_list<QuicEndpoint*> endpoints) 264 std::initializer_list<QuicEndpoint*> endpoints)
250 : Endpoint((*endpoints.begin())->simulator(), name) { 265 : Endpoint((*endpoints.begin())->simulator(), name) {
251 for (QuicEndpoint* endpoint : endpoints) { 266 for (QuicEndpoint* endpoint : endpoints) {
252 mapping_.insert(std::make_pair(endpoint->name(), endpoint)); 267 mapping_.insert(std::make_pair(endpoint->name(), endpoint));
253 } 268 }
254 } 269 }
255 270
256 QuicEndpointMultiplexer::~QuicEndpointMultiplexer() {} 271 QuicEndpointMultiplexer::~QuicEndpointMultiplexer() {}
(...skipping 10 matching lines...) Expand all
267 return this; 282 return this;
268 } 283 }
269 void QuicEndpointMultiplexer::SetTxPort(ConstrainedPortInterface* port) { 284 void QuicEndpointMultiplexer::SetTxPort(ConstrainedPortInterface* port) {
270 for (auto& key_value_pair : mapping_) { 285 for (auto& key_value_pair : mapping_) {
271 key_value_pair.second->SetTxPort(port); 286 key_value_pair.second->SetTxPort(port);
272 } 287 }
273 } 288 }
274 289
275 } // namespace simulator 290 } // namespace simulator
276 } // namespace net 291 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/simulator/quic_endpoint.h ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698