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 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ | 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ |
6 #define NET_QUIC_QUIC_PROTOCOL_H_ | 6 #define NET_QUIC_QUIC_PROTOCOL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 QuicPacketEntropyHash entropy_hash; | 854 QuicPacketEntropyHash entropy_hash; |
855 // The lowest packet we've sent which is unacked, and we expect an ack for. | 855 // The lowest packet we've sent which is unacked, and we expect an ack for. |
856 QuicPacketNumber least_unacked; | 856 QuicPacketNumber least_unacked; |
857 }; | 857 }; |
858 | 858 |
859 // A sequence of packet numbers where each number is unique. Intended to be used | 859 // A sequence of packet numbers where each number is unique. Intended to be used |
860 // in a sliding window fashion, where smaller old packet numbers are removed and | 860 // in a sliding window fashion, where smaller old packet numbers are removed and |
861 // larger new packet numbers are added, with the occasional random access. | 861 // larger new packet numbers are added, with the occasional random access. |
862 class NET_EXPORT_PRIVATE PacketNumberQueue { | 862 class NET_EXPORT_PRIVATE PacketNumberQueue { |
863 public: | 863 public: |
864 // TODO(jdorfman): remove const_iterator and change the callers to | 864 // TODO(jdorfman): remove const_iterator and change the callers to iterate |
865 // iterate over the intervals. | 865 // over the intervals. |
866 class NET_EXPORT_PRIVATE const_iterator | 866 class NET_EXPORT_PRIVATE const_iterator |
867 : public std::iterator<std::input_iterator_tag, | 867 : public std::iterator<std::input_iterator_tag, |
868 QuicPacketNumber, | 868 QuicPacketNumber, |
869 std::ptrdiff_t, | 869 std::ptrdiff_t, |
870 const QuicPacketNumber*, | 870 const QuicPacketNumber*, |
871 const QuicPacketNumber&> { | 871 const QuicPacketNumber&> { |
872 public: | 872 public: |
873 explicit const_iterator(PacketNumberSet::const_iterator set_iter); | 873 explicit const_iterator(PacketNumberSet::const_iterator set_iter); |
874 const_iterator( | 874 const_iterator( |
875 IntervalSet<QuicPacketNumber>::const_iterator interval_set_iter, | 875 IntervalSet<QuicPacketNumber>::const_iterator interval_set_iter, |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 : iov(iov), iov_count(iov_count), total_length(total_length) {} | 1401 : iov(iov), iov_count(iov_count), total_length(total_length) {} |
1402 | 1402 |
1403 const struct iovec* iov; | 1403 const struct iovec* iov; |
1404 const int iov_count; | 1404 const int iov_count; |
1405 const size_t total_length; | 1405 const size_t total_length; |
1406 }; | 1406 }; |
1407 | 1407 |
1408 } // namespace net | 1408 } // namespace net |
1409 | 1409 |
1410 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1410 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |