| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 this); | 383 this); |
| 384 session->InitializeSession(crypto_config_); | 384 session->InitializeSession(crypto_config_); |
| 385 return session; | 385 return session; |
| 386 } | 386 } |
| 387 | 387 |
| 388 QuicConnection* QuicDispatcher::CreateQuicConnection( | 388 QuicConnection* QuicDispatcher::CreateQuicConnection( |
| 389 QuicConnectionId connection_id, | 389 QuicConnectionId connection_id, |
| 390 const IPEndPoint& server_address, | 390 const IPEndPoint& server_address, |
| 391 const IPEndPoint& client_address) { | 391 const IPEndPoint& client_address) { |
| 392 if (FLAGS_enable_quic_stream_flow_control_2 && | 392 if (FLAGS_enable_quic_stream_flow_control_2 && |
| 393 FLAGS_enable_quic_connection_flow_control) { | 393 FLAGS_enable_quic_connection_flow_control_2) { |
| 394 DLOG(INFO) << "Creating QuicDispatcher with all versions."; | 394 DLOG(INFO) << "Creating QuicDispatcher with all versions."; |
| 395 return new QuicConnection(connection_id, client_address, helper_.get(), | 395 return new QuicConnection(connection_id, client_address, helper_.get(), |
| 396 writer_.get(), true, supported_versions_); | 396 writer_.get(), true, supported_versions_); |
| 397 } | 397 } |
| 398 | 398 |
| 399 if (FLAGS_enable_quic_stream_flow_control_2 && | 399 if (FLAGS_enable_quic_stream_flow_control_2 && |
| 400 !FLAGS_enable_quic_connection_flow_control) { | 400 !FLAGS_enable_quic_connection_flow_control_2) { |
| 401 DLOG(INFO) << "Connection flow control disabled, creating QuicDispatcher " | 401 DLOG(INFO) << "Connection flow control disabled, creating QuicDispatcher " |
| 402 << "WITHOUT version 19 or higher."; | 402 << "WITHOUT version 19 or higher."; |
| 403 return new QuicConnection(connection_id, client_address, helper_.get(), | 403 return new QuicConnection(connection_id, client_address, helper_.get(), |
| 404 writer_.get(), true, | 404 writer_.get(), true, |
| 405 supported_versions_no_connection_flow_control_); | 405 supported_versions_no_connection_flow_control_); |
| 406 } | 406 } |
| 407 | 407 |
| 408 DLOG(INFO) << "Flow control disabled, creating QuicDispatcher WITHOUT " | 408 DLOG(INFO) << "Flow control disabled, creating QuicDispatcher WITHOUT " |
| 409 << "version 17 or higher."; | 409 << "version 17 or higher."; |
| 410 return new QuicConnection(connection_id, client_address, helper_.get(), | 410 return new QuicConnection(connection_id, client_address, helper_.get(), |
| (...skipping 18 matching lines...) Expand all Loading... |
| 429 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( | 429 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( |
| 430 header.connection_id)); | 430 header.connection_id)); |
| 431 | 431 |
| 432 // Continue parsing the packet to extract the sequence number. Then | 432 // Continue parsing the packet to extract the sequence number. Then |
| 433 // send it to the time wait manager in OnUnathenticatedHeader. | 433 // send it to the time wait manager in OnUnathenticatedHeader. |
| 434 return true; | 434 return true; |
| 435 } | 435 } |
| 436 | 436 |
| 437 } // namespace tools | 437 } // namespace tools |
| 438 } // namespace net | 438 } // namespace net |
| OLD | NEW |