| 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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 switch (header.public_header.connection_id_length) { | 717 switch (header.public_header.connection_id_length) { |
| 718 case PACKET_0BYTE_CONNECTION_ID: | 718 case PACKET_0BYTE_CONNECTION_ID: |
| 719 if (!writer->WriteUInt8(public_flags | | 719 if (!writer->WriteUInt8(public_flags | |
| 720 PACKET_PUBLIC_FLAGS_0BYTE_CONNECTION_ID)) { | 720 PACKET_PUBLIC_FLAGS_0BYTE_CONNECTION_ID)) { |
| 721 return false; | 721 return false; |
| 722 } | 722 } |
| 723 break; | 723 break; |
| 724 case PACKET_8BYTE_CONNECTION_ID: | 724 case PACKET_8BYTE_CONNECTION_ID: |
| 725 if (quic_version_ > QUIC_VERSION_32) { | 725 if (quic_version_ > QUIC_VERSION_32) { |
| 726 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID; | 726 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID; |
| 727 if (!FLAGS_quic_remove_v33_hacks2 && |
| 728 perspective_ == Perspective::IS_CLIENT) { |
| 729 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD; |
| 730 } |
| 731 |
| 727 } else { | 732 } else { |
| 728 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD; | 733 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD; |
| 729 } | 734 } |
| 730 if (!writer->WriteUInt8(public_flags) || | 735 if (!writer->WriteUInt8(public_flags) || |
| 731 !writer->WriteUInt64(header.public_header.connection_id)) { | 736 !writer->WriteUInt64(header.public_header.connection_id)) { |
| 732 return false; | 737 return false; |
| 733 } | 738 } |
| 734 break; | 739 break; |
| 735 } | 740 } |
| 736 last_serialized_connection_id_ = header.public_header.connection_id; | 741 last_serialized_connection_id_ = header.public_header.connection_id; |
| (...skipping 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2575 | 2580 |
| 2576 bool QuicFramer::RaiseError(QuicErrorCode error) { | 2581 bool QuicFramer::RaiseError(QuicErrorCode error) { |
| 2577 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error) | 2582 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error) |
| 2578 << " detail: " << detailed_error_; | 2583 << " detail: " << detailed_error_; |
| 2579 set_error(error); | 2584 set_error(error); |
| 2580 visitor_->OnError(this); | 2585 visitor_->OnError(this); |
| 2581 return false; | 2586 return false; |
| 2582 } | 2587 } |
| 2583 | 2588 |
| 2584 } // namespace net | 2589 } // namespace net |
| OLD | NEW |