OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/quic_dispatcher.h" | 5 #include "net/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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 if (!writer_->IsWriteBlocked()) { | 338 if (!writer_->IsWriteBlocked()) { |
339 LOG(DFATAL) << | 339 LOG(DFATAL) << |
340 "QuicDispatcher::OnWriteBlocked called when the writer is not blocked."; | 340 "QuicDispatcher::OnWriteBlocked called when the writer is not blocked."; |
341 // Return without adding the connection to the blocked list, to avoid | 341 // Return without adding the connection to the blocked list, to avoid |
342 // infinite loops in OnCanWrite. | 342 // infinite loops in OnCanWrite. |
343 return; | 343 return; |
344 } | 344 } |
345 write_blocked_list_.insert(make_pair(blocked_writer, true)); | 345 write_blocked_list_.insert(make_pair(blocked_writer, true)); |
346 } | 346 } |
347 | 347 |
| 348 void QuicDispatcher::OnConnectionAddedToTimeWaitList( |
| 349 QuicConnectionId connection_id) { |
| 350 DVLOG(1) << "Connection " << connection_id << " added to time wait list."; |
| 351 } |
| 352 |
| 353 void QuicDispatcher::OnConnectionRemovedFromTimeWaitList( |
| 354 QuicConnectionId connection_id) { |
| 355 DVLOG(1) << "Connection " << connection_id << " removed from time wait list."; |
| 356 } |
| 357 |
348 QuicSession* QuicDispatcher::CreateQuicSession( | 358 QuicSession* QuicDispatcher::CreateQuicSession( |
349 QuicConnectionId connection_id, | 359 QuicConnectionId connection_id, |
350 const IPEndPoint& server_address, | 360 const IPEndPoint& server_address, |
351 const IPEndPoint& client_address) { | 361 const IPEndPoint& client_address) { |
352 QuicServerSession* session = new QuicServerSession( | 362 QuicServerSession* session = new QuicServerSession( |
353 config_, | 363 config_, |
354 CreateQuicConnection(connection_id, server_address, client_address), | 364 CreateQuicConnection(connection_id, server_address, client_address), |
355 this); | 365 this); |
356 session->InitializeSession(crypto_config_); | 366 session->InitializeSession(crypto_config_); |
357 return session; | 367 return session; |
(...skipping 29 matching lines...) Expand all Loading... |
387 // be parsed correctly. | 397 // be parsed correctly. |
388 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( | 398 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( |
389 header.connection_id)); | 399 header.connection_id)); |
390 | 400 |
391 // Continue parsing the packet to extract the sequence number. Then | 401 // Continue parsing the packet to extract the sequence number. Then |
392 // send it to the time wait manager in OnUnathenticatedHeader. | 402 // send it to the time wait manager in OnUnathenticatedHeader. |
393 return true; | 403 return true; |
394 } | 404 } |
395 | 405 |
396 } // namespace net | 406 } // namespace net |
OLD | NEW |