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/core/quic_framer.h" | 5 #include "net/quic/core/quic_framer.h" |
6 | 6 |
7 #include <cstdint> | 7 #include <cstdint> |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 } | 684 } |
685 break; | 685 break; |
686 } | 686 } |
687 last_serialized_connection_id_ = header.public_header.connection_id; | 687 last_serialized_connection_id_ = header.public_header.connection_id; |
688 | 688 |
689 if (header.public_header.version_flag) { | 689 if (header.public_header.version_flag) { |
690 DCHECK_EQ(Perspective::IS_CLIENT, perspective_); | 690 DCHECK_EQ(Perspective::IS_CLIENT, perspective_); |
691 QuicTag tag = QuicVersionToQuicTag(quic_version_); | 691 QuicTag tag = QuicVersionToQuicTag(quic_version_); |
692 writer->WriteUInt32(tag); | 692 writer->WriteUInt32(tag); |
693 DVLOG(1) << "version = " << quic_version_ << ", tag = '" | 693 DVLOG(1) << "version = " << quic_version_ << ", tag = '" |
694 << QuicUtils::TagToString(tag) << "'"; | 694 << QuicTagToString(tag) << "'"; |
695 } | 695 } |
696 | 696 |
697 if (header.public_header.multipath_flag && | 697 if (header.public_header.multipath_flag && |
698 !writer->WriteUInt8(header.path_id)) { | 698 !writer->WriteUInt8(header.path_id)) { |
699 return false; | 699 return false; |
700 } | 700 } |
701 | 701 |
702 if (header.public_header.nonce != nullptr && | 702 if (header.public_header.nonce != nullptr && |
703 !writer->WriteBytes(header.public_header.nonce, | 703 !writer->WriteBytes(header.public_header.nonce, |
704 kDiversificationNonceSize)) { | 704 kDiversificationNonceSize)) { |
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2185 | 2185 |
2186 bool QuicFramer::RaiseError(QuicErrorCode error) { | 2186 bool QuicFramer::RaiseError(QuicErrorCode error) { |
2187 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error) | 2187 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error) |
2188 << " detail: " << detailed_error_; | 2188 << " detail: " << detailed_error_; |
2189 set_error(error); | 2189 set_error(error); |
2190 visitor_->OnError(this); | 2190 visitor_->OnError(this); |
2191 return false; | 2191 return false; |
2192 } | 2192 } |
2193 | 2193 |
2194 } // namespace net | 2194 } // namespace net |
OLD | NEW |