| 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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 bool QuicConnection::OnStreamFrame(const QuicStreamFrame& frame) { | 648 bool QuicConnection::OnStreamFrame(const QuicStreamFrame& frame) { |
| 649 DCHECK(connected_); | 649 DCHECK(connected_); |
| 650 if (debug_visitor_ != nullptr) { | 650 if (debug_visitor_ != nullptr) { |
| 651 debug_visitor_->OnStreamFrame(frame); | 651 debug_visitor_->OnStreamFrame(frame); |
| 652 } | 652 } |
| 653 if (frame.stream_id != kCryptoStreamId && | 653 if (frame.stream_id != kCryptoStreamId && |
| 654 last_decrypted_packet_level_ == ENCRYPTION_NONE) { | 654 last_decrypted_packet_level_ == ENCRYPTION_NONE) { |
| 655 QUIC_BUG << ENDPOINT | 655 QUIC_BUG << ENDPOINT |
| 656 << "Received an unencrypted data frame: closing connection" | 656 << "Received an unencrypted data frame: closing connection" |
| 657 << " packet_number:" << last_header_.packet_number | 657 << " packet_number:" << last_header_.packet_number |
| 658 << " stream_id:" << frame.stream_id |
| 658 << " received_packets:" << received_packet_manager_.ack_frame(); | 659 << " received_packets:" << received_packet_manager_.ack_frame(); |
| 659 SendConnectionCloseWithDetails(QUIC_UNENCRYPTED_STREAM_DATA, | 660 SendConnectionCloseWithDetails(QUIC_UNENCRYPTED_STREAM_DATA, |
| 660 "Unencrypted stream data seen"); | 661 "Unencrypted stream data seen"); |
| 661 return false; | 662 return false; |
| 662 } | 663 } |
| 663 visitor_->OnStreamFrame(frame); | 664 visitor_->OnStreamFrame(frame); |
| 664 visitor_->PostProcessAfterData(); | 665 visitor_->PostProcessAfterData(); |
| 665 stats_.stream_bytes_received += frame.frame_length; | 666 stats_.stream_bytes_received += frame.frame_length; |
| 666 should_last_packet_instigate_acks_ = true; | 667 should_last_packet_instigate_acks_ = true; |
| 667 return connected_; | 668 return connected_; |
| (...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2333 void QuicConnection::OnPathClosed(QuicPathId path_id) { | 2334 void QuicConnection::OnPathClosed(QuicPathId path_id) { |
| 2334 // Stop receiving packets on this path. | 2335 // Stop receiving packets on this path. |
| 2335 framer_.OnPathClosed(path_id); | 2336 framer_.OnPathClosed(path_id); |
| 2336 } | 2337 } |
| 2337 | 2338 |
| 2338 bool QuicConnection::ack_frame_updated() const { | 2339 bool QuicConnection::ack_frame_updated() const { |
| 2339 return received_packet_manager_.ack_frame_updated(); | 2340 return received_packet_manager_.ack_frame_updated(); |
| 2340 } | 2341 } |
| 2341 | 2342 |
| 2342 } // namespace net | 2343 } // namespace net |
| OLD | NEW |