| 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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 switch (header.public_header.connection_id_length) { | 716 switch (header.public_header.connection_id_length) { |
| 717 case PACKET_0BYTE_CONNECTION_ID: | 717 case PACKET_0BYTE_CONNECTION_ID: |
| 718 if (!writer->WriteUInt8(public_flags | | 718 if (!writer->WriteUInt8(public_flags | |
| 719 PACKET_PUBLIC_FLAGS_0BYTE_CONNECTION_ID)) { | 719 PACKET_PUBLIC_FLAGS_0BYTE_CONNECTION_ID)) { |
| 720 return false; | 720 return false; |
| 721 } | 721 } |
| 722 break; | 722 break; |
| 723 case PACKET_8BYTE_CONNECTION_ID: | 723 case PACKET_8BYTE_CONNECTION_ID: |
| 724 if (quic_version_ > QUIC_VERSION_32) { | 724 if (quic_version_ > QUIC_VERSION_32) { |
| 725 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID; | 725 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID; |
| 726 if (!FLAGS_quic_remove_v33_hacks && | |
| 727 perspective_ == Perspective::IS_CLIENT) { | |
| 728 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD; | |
| 729 } | |
| 730 | |
| 731 } else { | 726 } else { |
| 732 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD; | 727 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD; |
| 733 } | 728 } |
| 734 if (!writer->WriteUInt8(public_flags) || | 729 if (!writer->WriteUInt8(public_flags) || |
| 735 !writer->WriteUInt64(header.public_header.connection_id)) { | 730 !writer->WriteUInt64(header.public_header.connection_id)) { |
| 736 return false; | 731 return false; |
| 737 } | 732 } |
| 738 break; | 733 break; |
| 739 } | 734 } |
| 740 last_serialized_connection_id_ = header.public_header.connection_id; | 735 last_serialized_connection_id_ = header.public_header.connection_id; |
| (...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2641 | 2636 |
| 2642 bool QuicFramer::RaiseError(QuicErrorCode error) { | 2637 bool QuicFramer::RaiseError(QuicErrorCode error) { |
| 2643 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error) | 2638 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error) |
| 2644 << " detail: " << detailed_error_; | 2639 << " detail: " << detailed_error_; |
| 2645 set_error(error); | 2640 set_error(error); |
| 2646 visitor_->OnError(this); | 2641 visitor_->OnError(this); |
| 2647 return false; | 2642 return false; |
| 2648 } | 2643 } |
| 2649 | 2644 |
| 2650 } // namespace net | 2645 } // namespace net |
| OLD | NEW |