OLD | NEW |
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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 const size_t transmission_size = | 226 const size_t transmission_size = |
227 std::min(kWriteChunkSize, bytes_to_transfer_); | 227 std::min(kWriteChunkSize, bytes_to_transfer_); |
228 memset(transmission_buffer_.get(), kStreamDataContents, transmission_size); | 228 memset(transmission_buffer_.get(), kStreamDataContents, transmission_size); |
229 | 229 |
230 iovec iov; | 230 iovec iov; |
231 iov.iov_base = transmission_buffer_.get(); | 231 iov.iov_base = transmission_buffer_.get(); |
232 iov.iov_len = transmission_size; | 232 iov.iov_len = transmission_size; |
233 | 233 |
234 QuicIOVector io_vector(&iov, 1, transmission_size); | 234 QuicIOVector io_vector(&iov, 1, transmission_size); |
235 QuicConsumedData consumed_data = connection_.SendStreamData( | 235 QuicConsumedData consumed_data = connection_.SendStreamData( |
236 kDataStream, io_vector, bytes_transferred_, false, nullptr); | 236 kDataStream, io_vector, bytes_transferred_, NO_FIN, nullptr); |
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 |
(...skipping 20 matching lines...) Expand all Loading... |
267 return this; | 267 return this; |
268 } | 268 } |
269 void QuicEndpointMultiplexer::SetTxPort(ConstrainedPortInterface* port) { | 269 void QuicEndpointMultiplexer::SetTxPort(ConstrainedPortInterface* port) { |
270 for (auto& key_value_pair : mapping_) { | 270 for (auto& key_value_pair : mapping_) { |
271 key_value_pair.second->SetTxPort(port); | 271 key_value_pair.second->SetTxPort(port); |
272 } | 272 } |
273 } | 273 } |
274 | 274 |
275 } // namespace simulator | 275 } // namespace simulator |
276 } // namespace net | 276 } // namespace net |
OLD | NEW |