| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 sent_packet_manager_.SetFromConfig(config); | 275 sent_packet_manager_.SetFromConfig(config); |
| 276 if (FLAGS_allow_truncated_connection_ids_for_quic && | 276 if (FLAGS_allow_truncated_connection_ids_for_quic && |
| 277 config.HasReceivedBytesForConnectionId() && | 277 config.HasReceivedBytesForConnectionId() && |
| 278 can_truncate_connection_ids_) { | 278 can_truncate_connection_ids_) { |
| 279 packet_generator_.SetConnectionIdLength( | 279 packet_generator_.SetConnectionIdLength( |
| 280 config.ReceivedBytesForConnectionId()); | 280 config.ReceivedBytesForConnectionId()); |
| 281 } | 281 } |
| 282 max_undecryptable_packets_ = config.max_undecryptable_packets(); | 282 max_undecryptable_packets_ = config.max_undecryptable_packets(); |
| 283 } | 283 } |
| 284 | 284 |
| 285 void QuicConnection::ResumeConnectionState( |
| 286 const CachedNetworkParameters& cached_network_params) { |
| 287 sent_packet_manager_.ResumeConnectionState(cached_network_params); |
| 288 } |
| 289 |
| 285 void QuicConnection::SetNumOpenStreams(size_t num_streams) { | 290 void QuicConnection::SetNumOpenStreams(size_t num_streams) { |
| 286 sent_packet_manager_.SetNumOpenStreams(num_streams); | 291 sent_packet_manager_.SetNumOpenStreams(num_streams); |
| 287 } | 292 } |
| 288 | 293 |
| 289 bool QuicConnection::SelectMutualVersion( | 294 bool QuicConnection::SelectMutualVersion( |
| 290 const QuicVersionVector& available_versions) { | 295 const QuicVersionVector& available_versions) { |
| 291 // Try to find the highest mutual version by iterating over supported | 296 // Try to find the highest mutual version by iterating over supported |
| 292 // versions, starting with the highest, and breaking out of the loop once we | 297 // versions, starting with the highest, and breaking out of the loop once we |
| 293 // find a matching version in the provided available_versions vector. | 298 // find a matching version in the provided available_versions vector. |
| 294 const QuicVersionVector& supported_versions = framer_.supported_versions(); | 299 const QuicVersionVector& supported_versions = framer_.supported_versions(); |
| (...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2085 } | 2090 } |
| 2086 for (size_t i = 0; i < retransmittable_frames->frames().size(); ++i) { | 2091 for (size_t i = 0; i < retransmittable_frames->frames().size(); ++i) { |
| 2087 if (retransmittable_frames->frames()[i].type == CONNECTION_CLOSE_FRAME) { | 2092 if (retransmittable_frames->frames()[i].type == CONNECTION_CLOSE_FRAME) { |
| 2088 return true; | 2093 return true; |
| 2089 } | 2094 } |
| 2090 } | 2095 } |
| 2091 return false; | 2096 return false; |
| 2092 } | 2097 } |
| 2093 | 2098 |
| 2094 } // namespace net | 2099 } // namespace net |
| OLD | NEW |