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

Side by Side Diff: net/tools/quic/quic_time_wait_list_manager.cc

Issue 1660533002: Landing Recent QUIC changes until 01/26/2016 18:14 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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/tools/quic/quic_time_wait_list_manager.h" 5 #include "net/tools/quic/quic_time_wait_list_manager.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 233 }
234 234
235 bool QuicTimeWaitListManager::WriteToWire(QueuedPacket* queued_packet) { 235 bool QuicTimeWaitListManager::WriteToWire(QueuedPacket* queued_packet) {
236 if (writer_->IsWriteBlocked()) { 236 if (writer_->IsWriteBlocked()) {
237 visitor_->OnWriteBlocked(this); 237 visitor_->OnWriteBlocked(this);
238 return false; 238 return false;
239 } 239 }
240 WriteResult result = writer_->WritePacket( 240 WriteResult result = writer_->WritePacket(
241 queued_packet->packet()->data(), queued_packet->packet()->length(), 241 queued_packet->packet()->data(), queued_packet->packet()->length(),
242 queued_packet->server_address().address().bytes(), 242 queued_packet->server_address().address().bytes(),
243 queued_packet->client_address()); 243 queued_packet->client_address(), nullptr);
244 if (result.status == WRITE_STATUS_BLOCKED) { 244 if (result.status == WRITE_STATUS_BLOCKED) {
245 // If blocked and unbuffered, return false to retry sending. 245 // If blocked and unbuffered, return false to retry sending.
246 DCHECK(writer_->IsWriteBlocked()); 246 DCHECK(writer_->IsWriteBlocked());
247 visitor_->OnWriteBlocked(this); 247 visitor_->OnWriteBlocked(this);
248 return writer_->IsWriteBlockedDataBuffered(); 248 return writer_->IsWriteBlockedDataBuffered();
249 } else if (result.status == WRITE_STATUS_ERROR) { 249 } else if (result.status == WRITE_STATUS_ERROR) {
250 LOG(WARNING) << "Received unknown error while sending reset packet to " 250 LOG(WARNING) << "Received unknown error while sending reset packet to "
251 << queued_packet->client_address().ToString() << ": " 251 << queued_packet->client_address().ToString() << ": "
252 << strerror(result.error_code); 252 << strerror(result.error_code);
253 } 253 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 QuicTime time_added_, 321 QuicTime time_added_,
322 bool connection_rejected_statelessly) 322 bool connection_rejected_statelessly)
323 : num_packets(num_packets_), 323 : num_packets(num_packets_),
324 version(version_), 324 version(version_),
325 time_added(time_added_), 325 time_added(time_added_),
326 connection_rejected_statelessly(connection_rejected_statelessly) {} 326 connection_rejected_statelessly(connection_rejected_statelessly) {}
327 327
328 QuicTimeWaitListManager::ConnectionIdData::~ConnectionIdData() {} 328 QuicTimeWaitListManager::ConnectionIdData::~ConnectionIdData() {}
329 329
330 } // namespace net 330 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_server_stream_test.cc ('k') | net/tools/quic/quic_time_wait_list_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698