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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 it != queued_packets_.end(); ++it) { | 284 it != queued_packets_.end(); ++it) { |
285 delete it->serialized_packet.retransmittable_frames; | 285 delete it->serialized_packet.retransmittable_frames; |
286 delete it->serialized_packet.packet; | 286 delete it->serialized_packet.packet; |
287 } | 287 } |
288 } | 288 } |
289 | 289 |
290 void QuicConnection::SetFromConfig(const QuicConfig& config) { | 290 void QuicConnection::SetFromConfig(const QuicConfig& config) { |
291 if (config.negotiated()) { | 291 if (config.negotiated()) { |
292 SetNetworkTimeouts(QuicTime::Delta::Infinite(), | 292 SetNetworkTimeouts(QuicTime::Delta::Infinite(), |
293 config.IdleConnectionStateLifetime()); | 293 config.IdleConnectionStateLifetime()); |
294 if (FLAGS_quic_allow_silent_close && config.SilentClose()) { | 294 if (config.SilentClose()) { |
295 silent_close_enabled_ = true; | 295 silent_close_enabled_ = true; |
296 } | 296 } |
297 } else { | 297 } else { |
298 SetNetworkTimeouts(config.max_time_before_crypto_handshake(), | 298 SetNetworkTimeouts(config.max_time_before_crypto_handshake(), |
299 config.max_idle_time_before_crypto_handshake()); | 299 config.max_idle_time_before_crypto_handshake()); |
300 } | 300 } |
301 | 301 |
302 sent_packet_manager_.SetFromConfig(config); | 302 sent_packet_manager_.SetFromConfig(config); |
303 if (config.HasReceivedBytesForConnectionId() && | 303 if (config.HasReceivedBytesForConnectionId() && |
304 can_truncate_connection_ids_) { | 304 can_truncate_connection_ids_) { |
(...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2101 } | 2101 } |
2102 for (const QuicFrame& frame : retransmittable_frames->frames()) { | 2102 for (const QuicFrame& frame : retransmittable_frames->frames()) { |
2103 if (frame.type == CONNECTION_CLOSE_FRAME) { | 2103 if (frame.type == CONNECTION_CLOSE_FRAME) { |
2104 return true; | 2104 return true; |
2105 } | 2105 } |
2106 } | 2106 } |
2107 return false; | 2107 return false; |
2108 } | 2108 } |
2109 | 2109 |
2110 } // namespace net | 2110 } // namespace net |
OLD | NEW |