| 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/quic_connection.h" | 5 #include "net/quic/quic_connection.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1745 first_required_forward_secure_packet_ = | 1745 first_required_forward_secure_packet_ = |
| 1746 sequence_number_of_last_sent_packet_ + | 1746 sequence_number_of_last_sent_packet_ + |
| 1747 // 3 times the current congestion window (in slow start) should cover | 1747 // 3 times the current congestion window (in slow start) should cover |
| 1748 // about two full round trips worth of packets, which should be | 1748 // about two full round trips worth of packets, which should be |
| 1749 // sufficient. | 1749 // sufficient. |
| 1750 3 * sent_packet_manager_.EstimateMaxPacketsInFlight( | 1750 3 * sent_packet_manager_.EstimateMaxPacketsInFlight( |
| 1751 max_packet_length()); | 1751 max_packet_length()); |
| 1752 } | 1752 } |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 const QuicEncrypter* QuicConnection::encrypter(EncryptionLevel level) const { | |
| 1756 return framer_.encrypter(level); | |
| 1757 } | |
| 1758 | |
| 1759 void QuicConnection::SetDefaultEncryptionLevel(EncryptionLevel level) { | 1755 void QuicConnection::SetDefaultEncryptionLevel(EncryptionLevel level) { |
| 1760 encryption_level_ = level; | 1756 encryption_level_ = level; |
| 1761 packet_generator_.set_encryption_level(level); | 1757 packet_generator_.set_encryption_level(level); |
| 1762 } | 1758 } |
| 1763 | 1759 |
| 1764 void QuicConnection::SetDecrypter(QuicDecrypter* decrypter, | 1760 void QuicConnection::SetDecrypter(QuicDecrypter* decrypter, |
| 1765 EncryptionLevel level) { | 1761 EncryptionLevel level) { |
| 1766 framer_.SetDecrypter(decrypter, level); | 1762 framer_.SetDecrypter(decrypter, level); |
| 1767 } | 1763 } |
| 1768 | 1764 |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2143 } | 2139 } |
| 2144 for (const QuicFrame& frame : retransmittable_frames->frames()) { | 2140 for (const QuicFrame& frame : retransmittable_frames->frames()) { |
| 2145 if (frame.type == CONNECTION_CLOSE_FRAME) { | 2141 if (frame.type == CONNECTION_CLOSE_FRAME) { |
| 2146 return true; | 2142 return true; |
| 2147 } | 2143 } |
| 2148 } | 2144 } |
| 2149 return false; | 2145 return false; |
| 2150 } | 2146 } |
| 2151 | 2147 |
| 2152 } // namespace net | 2148 } // namespace net |
| OLD | NEW |