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

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

Issue 1565303002: Change IPEndpoint::address() to return a net::IPAddress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase for ChromeOS Created 4 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
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 235
236 bool QuicTimeWaitListManager::WriteToWire(QueuedPacket* queued_packet) { 236 bool QuicTimeWaitListManager::WriteToWire(QueuedPacket* queued_packet) {
237 if (writer_->IsWriteBlocked()) { 237 if (writer_->IsWriteBlocked()) {
238 visitor_->OnWriteBlocked(this); 238 visitor_->OnWriteBlocked(this);
239 return false; 239 return false;
240 } 240 }
241 WriteResult result = writer_->WritePacket( 241 WriteResult result = writer_->WritePacket(
242 queued_packet->packet()->data(), queued_packet->packet()->length(), 242 queued_packet->packet()->data(), queued_packet->packet()->length(),
243 queued_packet->server_address().address(), 243 queued_packet->server_address().address().bytes(),
244 queued_packet->client_address()); 244 queued_packet->client_address());
245 if (result.status == WRITE_STATUS_BLOCKED) { 245 if (result.status == WRITE_STATUS_BLOCKED) {
246 // If blocked and unbuffered, return false to retry sending. 246 // If blocked and unbuffered, return false to retry sending.
247 DCHECK(writer_->IsWriteBlocked()); 247 DCHECK(writer_->IsWriteBlocked());
248 visitor_->OnWriteBlocked(this); 248 visitor_->OnWriteBlocked(this);
249 return writer_->IsWriteBlockedDataBuffered(); 249 return writer_->IsWriteBlockedDataBuffered();
250 } else if (result.status == WRITE_STATUS_ERROR) { 250 } else if (result.status == WRITE_STATUS_ERROR) {
251 LOG(WARNING) << "Received unknown error while sending reset packet to " 251 LOG(WARNING) << "Received unknown error while sending reset packet to "
252 << queued_packet->client_address().ToString() << ": " 252 << queued_packet->client_address().ToString() << ": "
253 << strerror(result.error_code); 253 << strerror(result.error_code);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 bool connection_rejected_statelessly) 323 bool connection_rejected_statelessly)
324 : num_packets(num_packets_), 324 : num_packets(num_packets_),
325 version(version_), 325 version(version_),
326 time_added(time_added_), 326 time_added(time_added_),
327 connection_rejected_statelessly(connection_rejected_statelessly) {} 327 connection_rejected_statelessly(connection_rejected_statelessly) {}
328 328
329 QuicTimeWaitListManager::ConnectionIdData::~ConnectionIdData() {} 329 QuicTimeWaitListManager::ConnectionIdData::~ConnectionIdData() {}
330 330
331 } // namespace tools 331 } // namespace tools
332 } // namespace net 332 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_client_bin.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