| 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 << " packet_number:" << last_header_.packet_number | 696 << " packet_number:" << last_header_.packet_number |
| 697 << " stream_id:" << frame.stream_id | 697 << " stream_id:" << frame.stream_id |
| 698 << " received_packets:" << received_packet_manager_.ack_frame(); | 698 << " received_packets:" << received_packet_manager_.ack_frame(); |
| 699 CloseConnection(QUIC_UNENCRYPTED_STREAM_DATA, | 699 CloseConnection(QUIC_UNENCRYPTED_STREAM_DATA, |
| 700 "Unencrypted stream data seen.", | 700 "Unencrypted stream data seen.", |
| 701 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); | 701 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); |
| 702 return false; | 702 return false; |
| 703 } | 703 } |
| 704 visitor_->OnStreamFrame(frame); | 704 visitor_->OnStreamFrame(frame); |
| 705 visitor_->PostProcessAfterData(); | 705 visitor_->PostProcessAfterData(); |
| 706 stats_.stream_bytes_received += frame.frame_length; | 706 stats_.stream_bytes_received += frame.data_length; |
| 707 should_last_packet_instigate_acks_ = true; | 707 should_last_packet_instigate_acks_ = true; |
| 708 return connected_; | 708 return connected_; |
| 709 } | 709 } |
| 710 | 710 |
| 711 bool QuicConnection::OnAckFrame(const QuicAckFrame& incoming_ack) { | 711 bool QuicConnection::OnAckFrame(const QuicAckFrame& incoming_ack) { |
| 712 DCHECK(connected_); | 712 DCHECK(connected_); |
| 713 if (debug_visitor_ != nullptr) { | 713 if (debug_visitor_ != nullptr) { |
| 714 debug_visitor_->OnAckFrame(incoming_ack); | 714 debug_visitor_->OnAckFrame(incoming_ack); |
| 715 } | 715 } |
| 716 DVLOG(1) << ENDPOINT << "OnAckFrame: " << incoming_ack; | 716 DVLOG(1) << ENDPOINT << "OnAckFrame: " << incoming_ack; |
| (...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2436 } | 2436 } |
| 2437 | 2437 |
| 2438 StringPiece QuicConnection::GetCurrentPacket() { | 2438 StringPiece QuicConnection::GetCurrentPacket() { |
| 2439 if (current_packet_data_ == nullptr) { | 2439 if (current_packet_data_ == nullptr) { |
| 2440 return StringPiece(); | 2440 return StringPiece(); |
| 2441 } | 2441 } |
| 2442 return StringPiece(current_packet_data_, last_size_); | 2442 return StringPiece(current_packet_data_, last_size_); |
| 2443 } | 2443 } |
| 2444 | 2444 |
| 2445 } // namespace net | 2445 } // namespace net |
| OLD | NEW |