| 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/tools/quic/quic_dispatcher.h" | 5 #include "net/tools/quic/quic_dispatcher.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 | 8 |
| 9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 if (!writer_->IsWriteBlocked()) { | 346 if (!writer_->IsWriteBlocked()) { |
| 347 LOG(DFATAL) << | 347 LOG(DFATAL) << |
| 348 "QuicDispatcher::OnWriteBlocked called when the writer is not blocked."; | 348 "QuicDispatcher::OnWriteBlocked called when the writer is not blocked."; |
| 349 // Return without adding the connection to the blocked list, to avoid | 349 // Return without adding the connection to the blocked list, to avoid |
| 350 // infinite loops in OnCanWrite. | 350 // infinite loops in OnCanWrite. |
| 351 return; | 351 return; |
| 352 } | 352 } |
| 353 write_blocked_list_.insert(make_pair(blocked_writer, true)); | 353 write_blocked_list_.insert(make_pair(blocked_writer, true)); |
| 354 } | 354 } |
| 355 | 355 |
| 356 void QuicDispatcher::OnConnectionAddedToTimeWaitList( |
| 357 QuicConnectionId connection_id) { |
| 358 DVLOG(1) << "Connection " << connection_id << " added to time wait list."; |
| 359 } |
| 360 |
| 361 void QuicDispatcher::OnConnectionRemovedFromTimeWaitList( |
| 362 QuicConnectionId connection_id) { |
| 363 DVLOG(1) << "Connection " << connection_id << " removed from time wait list."; |
| 364 } |
| 365 |
| 356 QuicPacketWriter* QuicDispatcher::CreateWriter(int fd) { | 366 QuicPacketWriter* QuicDispatcher::CreateWriter(int fd) { |
| 357 return new QuicDefaultPacketWriter(fd); | 367 return new QuicDefaultPacketWriter(fd); |
| 358 } | 368 } |
| 359 | 369 |
| 360 QuicSession* QuicDispatcher::CreateQuicSession( | 370 QuicSession* QuicDispatcher::CreateQuicSession( |
| 361 QuicConnectionId connection_id, | 371 QuicConnectionId connection_id, |
| 362 const IPEndPoint& server_address, | 372 const IPEndPoint& server_address, |
| 363 const IPEndPoint& client_address) { | 373 const IPEndPoint& client_address) { |
| 364 QuicServerSession* session = new QuicServerSession( | 374 QuicServerSession* session = new QuicServerSession( |
| 365 config_, | 375 config_, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( | 410 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( |
| 401 header.connection_id)); | 411 header.connection_id)); |
| 402 | 412 |
| 403 // Continue parsing the packet to extract the sequence number. Then | 413 // Continue parsing the packet to extract the sequence number. Then |
| 404 // send it to the time wait manager in OnUnathenticatedHeader. | 414 // send it to the time wait manager in OnUnathenticatedHeader. |
| 405 return true; | 415 return true; |
| 406 } | 416 } |
| 407 | 417 |
| 408 } // namespace tools | 418 } // namespace tools |
| 409 } // namespace net | 419 } // namespace net |
| OLD | NEW |