| 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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 switch (header.public_header.connection_id_length) { | 714 switch (header.public_header.connection_id_length) { |
| 715 case PACKET_0BYTE_CONNECTION_ID: | 715 case PACKET_0BYTE_CONNECTION_ID: |
| 716 if (!writer->WriteUInt8(public_flags | | 716 if (!writer->WriteUInt8(public_flags | |
| 717 PACKET_PUBLIC_FLAGS_0BYTE_CONNECTION_ID)) { | 717 PACKET_PUBLIC_FLAGS_0BYTE_CONNECTION_ID)) { |
| 718 return false; | 718 return false; |
| 719 } | 719 } |
| 720 break; | 720 break; |
| 721 case PACKET_8BYTE_CONNECTION_ID: | 721 case PACKET_8BYTE_CONNECTION_ID: |
| 722 if (quic_version_ > QUIC_VERSION_32) { | 722 if (quic_version_ > QUIC_VERSION_32) { |
| 723 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID; | 723 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID; |
| 724 if (perspective_ == Perspective::IS_CLIENT) { | 724 if (!FLAGS_quic_remove_v33_hacks && |
| 725 // TODO(rch): Fix this when v33 flags are supported by middle boxes. | 725 perspective_ == Perspective::IS_CLIENT) { |
| 726 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD; | 726 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD; |
| 727 } | 727 } |
| 728 | 728 |
| 729 } else { | 729 } else { |
| 730 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD; | 730 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD; |
| 731 } | 731 } |
| 732 if (!writer->WriteUInt8(public_flags) || | 732 if (!writer->WriteUInt8(public_flags) || |
| 733 !writer->WriteUInt64(header.public_header.connection_id)) { | 733 !writer->WriteUInt64(header.public_header.connection_id)) { |
| 734 return false; | 734 return false; |
| 735 } | 735 } |
| (...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2706 | 2706 |
| 2707 bool QuicFramer::RaiseError(QuicErrorCode error) { | 2707 bool QuicFramer::RaiseError(QuicErrorCode error) { |
| 2708 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error) | 2708 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error) |
| 2709 << " detail: " << detailed_error_; | 2709 << " detail: " << detailed_error_; |
| 2710 set_error(error); | 2710 set_error(error); |
| 2711 visitor_->OnError(this); | 2711 visitor_->OnError(this); |
| 2712 return false; | 2712 return false; |
| 2713 } | 2713 } |
| 2714 | 2714 |
| 2715 } // namespace net | 2715 } // namespace net |
| OLD | NEW |