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 #include <limits> | 10 #include <limits> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 typedef uint8 QuicPacketEntropyHash; | 43 typedef uint8 QuicPacketEntropyHash; |
44 typedef uint32 QuicHeaderId; | 44 typedef uint32 QuicHeaderId; |
45 // QuicTag is the type of a tag in the wire protocol. | 45 // QuicTag is the type of a tag in the wire protocol. |
46 typedef uint32 QuicTag; | 46 typedef uint32 QuicTag; |
47 typedef std::vector<QuicTag> QuicTagVector; | 47 typedef std::vector<QuicTag> QuicTagVector; |
48 typedef std::map<QuicTag, std::string> QuicTagValueMap; | 48 typedef std::map<QuicTag, std::string> QuicTagValueMap; |
49 // TODO(rtenneti): Didn't use SpdyPriority because SpdyPriority is uint8 and | 49 // TODO(rtenneti): Didn't use SpdyPriority because SpdyPriority is uint8 and |
50 // QuicPriority is uint32. Use SpdyPriority when we change the QUIC_VERSION. | 50 // QuicPriority is uint32. Use SpdyPriority when we change the QUIC_VERSION. |
51 typedef uint32 QuicPriority; | 51 typedef uint32 QuicPriority; |
52 | 52 |
53 // Default and initial maximum size in bytes of a QUIC packet. | 53 // Default initial maximum size in bytes of a QUIC packet. |
54 const QuicByteCount kDefaultMaxPacketSize = 1350; | 54 const QuicByteCount kDefaultMaxPacketSize = 1350; |
55 // Default initial maximum size in bytes of a QUIC packet for servers. | 55 // Default initial maximum size in bytes of a QUIC packet for servers. |
56 const QuicByteCount kDefaultServerMaxPacketSize = 1000; | 56 const QuicByteCount kDefaultServerMaxPacketSize = 1000; |
57 // The maximum packet size of any QUIC packet, based on ethernet's max size, | 57 // The maximum packet size of any QUIC packet, based on ethernet's max size, |
58 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an | 58 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an |
59 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's | 59 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's |
60 // max packet size is 1500 bytes, 1500 - 48 = 1452. | 60 // max packet size is 1500 bytes, 1500 - 48 = 1452. |
61 const QuicByteCount kMaxPacketSize = 1452; | 61 const QuicByteCount kMaxPacketSize = 1452; |
62 // Default maximum packet size used in the Linux TCP implementation. | 62 // Default maximum packet size used in the Linux TCP implementation. |
63 // Used in QUIC for congestion window computations in bytes. | 63 // Used in QUIC for congestion window computations in bytes. |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 : iov(iov), iov_count(iov_count), total_length(total_length) {} | 1099 : iov(iov), iov_count(iov_count), total_length(total_length) {} |
1100 | 1100 |
1101 const struct iovec* iov; | 1101 const struct iovec* iov; |
1102 const int iov_count; | 1102 const int iov_count; |
1103 const size_t total_length; | 1103 const size_t total_length; |
1104 }; | 1104 }; |
1105 | 1105 |
1106 } // namespace net | 1106 } // namespace net |
1107 | 1107 |
1108 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1108 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |