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 #include <algorithm> | 9 #include <algorithm> |
10 #include <iterator> | 10 #include <iterator> |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 DVLOG(1) << ENDPOINT << "Connection " << connection_id() | 732 DVLOG(1) << ENDPOINT << "Connection " << connection_id() |
733 << " closed with error " | 733 << " closed with error " |
734 << QuicUtils::ErrorToString(frame.error_code) | 734 << QuicUtils::ErrorToString(frame.error_code) |
735 << " " << frame.error_details; | 735 << " " << frame.error_details; |
736 last_close_frames_.push_back(frame); | 736 last_close_frames_.push_back(frame); |
737 return connected_; | 737 return connected_; |
738 } | 738 } |
739 | 739 |
740 bool QuicConnection::OnGoAwayFrame(const QuicGoAwayFrame& frame) { | 740 bool QuicConnection::OnGoAwayFrame(const QuicGoAwayFrame& frame) { |
741 DCHECK(connected_); | 741 DCHECK(connected_); |
| 742 if (debug_visitor_) { |
| 743 debug_visitor_->OnGoAwayFrame(frame); |
| 744 } |
742 DVLOG(1) << ENDPOINT << "Go away received with error " | 745 DVLOG(1) << ENDPOINT << "Go away received with error " |
743 << QuicUtils::ErrorToString(frame.error_code) | 746 << QuicUtils::ErrorToString(frame.error_code) |
744 << " and reason:" << frame.reason_phrase; | 747 << " and reason:" << frame.reason_phrase; |
745 last_goaway_frames_.push_back(frame); | 748 last_goaway_frames_.push_back(frame); |
746 return connected_; | 749 return connected_; |
747 } | 750 } |
748 | 751 |
749 bool QuicConnection::OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) { | 752 bool QuicConnection::OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) { |
750 DCHECK(connected_); | 753 DCHECK(connected_); |
751 if (debug_visitor_) { | 754 if (debug_visitor_) { |
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1978 // If we changed the generator's batch state, restore original batch state. | 1981 // If we changed the generator's batch state, restore original batch state. |
1979 if (!already_in_batch_mode_) { | 1982 if (!already_in_batch_mode_) { |
1980 DVLOG(1) << "Leaving Batch Mode."; | 1983 DVLOG(1) << "Leaving Batch Mode."; |
1981 connection_->packet_generator_.FinishBatchOperations(); | 1984 connection_->packet_generator_.FinishBatchOperations(); |
1982 } | 1985 } |
1983 DCHECK_EQ(already_in_batch_mode_, | 1986 DCHECK_EQ(already_in_batch_mode_, |
1984 connection_->packet_generator_.InBatchMode()); | 1987 connection_->packet_generator_.InBatchMode()); |
1985 } | 1988 } |
1986 | 1989 |
1987 } // namespace net | 1990 } // namespace net |
OLD | NEW |