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

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

Issue 146033003: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 6 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 | Annotate | Revision Log
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/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 bool QuicTimeWaitListManager::WriteToWire(QueuedPacket* queued_packet) { 210 bool QuicTimeWaitListManager::WriteToWire(QueuedPacket* queued_packet) {
211 if (writer_->IsWriteBlocked()) { 211 if (writer_->IsWriteBlocked()) {
212 visitor_->OnWriteBlocked(this); 212 visitor_->OnWriteBlocked(this);
213 return false; 213 return false;
214 } 214 }
215 WriteResult result = writer_->WritePacket( 215 WriteResult result = writer_->WritePacket(
216 queued_packet->packet()->data(), 216 queued_packet->packet()->data(),
217 queued_packet->packet()->length(), 217 queued_packet->packet()->length(),
218 queued_packet->server_address().address(), 218 queued_packet->server_address().address(),
219 queued_packet->client_address(), 219 queued_packet->client_address());
220 this);
221 if (result.status == WRITE_STATUS_BLOCKED) { 220 if (result.status == WRITE_STATUS_BLOCKED) {
222 // If blocked and unbuffered, return false to retry sending. 221 // If blocked and unbuffered, return false to retry sending.
223 DCHECK(writer_->IsWriteBlocked()); 222 DCHECK(writer_->IsWriteBlocked());
224 visitor_->OnWriteBlocked(this); 223 visitor_->OnWriteBlocked(this);
225 return writer_->IsWriteBlockedDataBuffered(); 224 return writer_->IsWriteBlockedDataBuffered();
226 } else if (result.status == WRITE_STATUS_ERROR) { 225 } else if (result.status == WRITE_STATUS_ERROR) {
227 LOG(WARNING) << "Received unknown error while sending reset packet to " 226 LOG(WARNING) << "Received unknown error while sending reset packet to "
228 << queued_packet->client_address().ToString() << ": " 227 << queued_packet->client_address().ToString() << ": "
229 << strerror(result.error_code); 228 << strerror(result.error_code);
230 } 229 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 263 }
265 // This guid has lived its age, retire it now. 264 // This guid has lived its age, retire it now.
266 delete it->second.close_packet; 265 delete it->second.close_packet;
267 guid_map_.erase(it); 266 guid_map_.erase(it);
268 } 267 }
269 SetGuidCleanUpAlarm(); 268 SetGuidCleanUpAlarm();
270 } 269 }
271 270
272 } // namespace tools 271 } // namespace tools
273 } // namespace net 272 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_packet_writer_wrapper.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