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_framer.h" | 5 #include "net/quic/quic_framer.h" |
6 | 6 |
7 #include "base/containers/hash_tables.h" | 7 #include "base/containers/hash_tables.h" |
8 #include "net/quic/crypto/quic_decrypter.h" | 8 #include "net/quic/crypto/quic_decrypter.h" |
9 #include "net/quic/crypto/quic_encrypter.h" | 9 #include "net/quic/crypto/quic_encrypter.h" |
10 #include "net/quic/quic_data_reader.h" | 10 #include "net/quic/quic_data_reader.h" |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
612 return false; | 612 return false; |
613 } | 613 } |
614 | 614 |
615 visitor_->OnPacketComplete(); | 615 visitor_->OnPacketComplete(); |
616 reader_.reset(NULL); | 616 reader_.reset(NULL); |
617 return true; | 617 return true; |
618 } | 618 } |
619 | 619 |
620 bool QuicFramer::AppendPacketHeader(const QuicPacketHeader& header, | 620 bool QuicFramer::AppendPacketHeader(const QuicPacketHeader& header, |
621 QuicDataWriter* writer) { | 621 QuicDataWriter* writer) { |
622 DVLOG(1) << "Header: " << header; | |
Ryan Hamilton
2014/01/29 00:52:52
nit: "Appending header: "
ramant (doing other things)
2014/01/29 02:45:38
Done.
| |
622 DCHECK(header.fec_group > 0 || header.is_in_fec_group == NOT_IN_FEC_GROUP); | 623 DCHECK(header.fec_group > 0 || header.is_in_fec_group == NOT_IN_FEC_GROUP); |
623 uint8 public_flags = 0; | 624 uint8 public_flags = 0; |
624 if (header.public_header.reset_flag) { | 625 if (header.public_header.reset_flag) { |
625 public_flags |= PACKET_PUBLIC_FLAGS_RST; | 626 public_flags |= PACKET_PUBLIC_FLAGS_RST; |
626 } | 627 } |
627 if (header.public_header.version_flag) { | 628 if (header.public_header.version_flag) { |
628 public_flags |= PACKET_PUBLIC_FLAGS_VERSION; | 629 public_flags |= PACKET_PUBLIC_FLAGS_VERSION; |
629 } | 630 } |
630 | 631 |
631 public_flags |= | 632 public_flags |= |
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2040 | 2041 |
2041 bool QuicFramer::RaiseError(QuicErrorCode error) { | 2042 bool QuicFramer::RaiseError(QuicErrorCode error) { |
2042 DVLOG(1) << "Error detail: " << detailed_error_; | 2043 DVLOG(1) << "Error detail: " << detailed_error_; |
2043 set_error(error); | 2044 set_error(error); |
2044 visitor_->OnError(this); | 2045 visitor_->OnError(this); |
2045 reader_.reset(NULL); | 2046 reader_.reset(NULL); |
2046 return false; | 2047 return false; |
2047 } | 2048 } |
2048 | 2049 |
2049 } // namespace net | 2050 } // namespace net |
OLD | NEW |