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/quic/chromium/quic_stream_factory.h" | 5 #include "net/quic/chromium/quic_stream_factory.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <tuple> | 8 #include <tuple> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1678 | 1678 |
1679 QuicChromiumPacketWriter* writer = new QuicChromiumPacketWriter(socket.get()); | 1679 QuicChromiumPacketWriter* writer = new QuicChromiumPacketWriter(socket.get()); |
1680 QuicConnection* connection = new QuicConnection( | 1680 QuicConnection* connection = new QuicConnection( |
1681 connection_id, QuicSocketAddress(QuicSocketAddressImpl(addr)), | 1681 connection_id, QuicSocketAddress(QuicSocketAddressImpl(addr)), |
1682 helper_.get(), alarm_factory_.get(), writer, true /* owns_writer */, | 1682 helper_.get(), alarm_factory_.get(), writer, true /* owns_writer */, |
1683 Perspective::IS_CLIENT, supported_versions_); | 1683 Perspective::IS_CLIENT, supported_versions_); |
1684 connection->set_ping_timeout(ping_timeout_); | 1684 connection->set_ping_timeout(ping_timeout_); |
1685 connection->SetMaxPacketLength(max_packet_length_); | 1685 connection->SetMaxPacketLength(max_packet_length_); |
1686 | 1686 |
1687 QuicConfig config = config_; | 1687 QuicConfig config = config_; |
1688 config.SetSocketReceiveBufferToSend(kQuicSocketReceiveBufferSize); | |
1689 config.set_max_undecryptable_packets(kMaxUndecryptablePackets); | 1688 config.set_max_undecryptable_packets(kMaxUndecryptablePackets); |
1690 config.SetInitialSessionFlowControlWindowToSend( | 1689 config.SetInitialSessionFlowControlWindowToSend( |
1691 kQuicSessionMaxRecvWindowSize); | 1690 kQuicSessionMaxRecvWindowSize); |
1692 config.SetInitialStreamFlowControlWindowToSend(kQuicStreamMaxRecvWindowSize); | 1691 config.SetInitialStreamFlowControlWindowToSend(kQuicStreamMaxRecvWindowSize); |
1693 config.SetBytesForConnectionIdToSend(0); | 1692 config.SetBytesForConnectionIdToSend(0); |
1694 ConfigureInitialRttEstimate(server_id, &config); | 1693 ConfigureInitialRttEstimate(server_id, &config); |
1695 | 1694 |
1696 if (force_hol_blocking_) | 1695 if (force_hol_blocking_) |
1697 config.SetForceHolBlocking(); | 1696 config.SetForceHolBlocking(); |
1698 | 1697 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1965 // Since the session was active, there's no longer an | 1964 // Since the session was active, there's no longer an |
1966 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP | 1965 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP |
1967 // job also fails. So to avoid not using QUIC when we otherwise could, we mark | 1966 // job also fails. So to avoid not using QUIC when we otherwise could, we mark |
1968 // it as recently broken, which means that 0-RTT will be disabled but we'll | 1967 // it as recently broken, which means that 0-RTT will be disabled but we'll |
1969 // still race. | 1968 // still race. |
1970 http_server_properties_->MarkAlternativeServiceRecentlyBroken( | 1969 http_server_properties_->MarkAlternativeServiceRecentlyBroken( |
1971 alternative_service); | 1970 alternative_service); |
1972 } | 1971 } |
1973 | 1972 |
1974 } // namespace net | 1973 } // namespace net |
OLD | NEW |