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 <limits> | 9 #include <limits> |
10 #include <map> | 10 #include <map> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // Default and initial maximum size in bytes of a QUIC packet. | 53 // Default and initial maximum size in bytes of a QUIC packet. |
54 const QuicByteCount kDefaultMaxPacketSize = 1200; | 54 const QuicByteCount kDefaultMaxPacketSize = 1200; |
55 // The maximum packet size of any QUIC packet, based on ethernet's max size, | 55 // The maximum packet size of any QUIC packet, based on ethernet's max size, |
56 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an | 56 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an |
57 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's | 57 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's |
58 // max packet size is 1500 bytes, 1500 - 48 = 1452. | 58 // max packet size is 1500 bytes, 1500 - 48 = 1452. |
59 const QuicByteCount kMaxPacketSize = 1452; | 59 const QuicByteCount kMaxPacketSize = 1452; |
60 | 60 |
61 // Maximum size of the initial congestion window in packets. | 61 // Maximum size of the initial congestion window in packets. |
62 const size_t kDefaultInitialWindow = 10; | 62 const size_t kDefaultInitialWindow = 10; |
63 // TODO(ianswett): Temporarily changed to 10 due to a large number of clients | 63 const size_t kMaxInitialWindow = 100; |
64 // mistakenly negotiating 100 initially and suffering the consequences. | |
65 const size_t kMaxInitialWindow = 10; | |
66 | 64 |
67 // Maximum size of the congestion window, in packets, for TCP congestion control | 65 // Maximum size of the congestion window, in packets, for TCP congestion control |
68 // algorithms. | 66 // algorithms. |
69 const size_t kMaxTcpCongestionWindow = 200; | 67 const size_t kMaxTcpCongestionWindow = 200; |
70 | 68 |
71 // Don't allow a client to suggest an RTT longer than 15 seconds. | 69 // Don't allow a client to suggest an RTT longer than 15 seconds. |
72 const size_t kMaxInitialRoundTripTimeUs = 15 * kNumMicrosPerSecond; | 70 const size_t kMaxInitialRoundTripTimeUs = 15 * kNumMicrosPerSecond; |
73 | 71 |
74 // Maximum number of open streams per connection. | 72 // Maximum number of open streams per connection. |
75 const size_t kDefaultMaxStreamsPerConnection = 100; | 73 const size_t kDefaultMaxStreamsPerConnection = 100; |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 WriteStatus status; | 1003 WriteStatus status; |
1006 union { | 1004 union { |
1007 int bytes_written; // only valid when status is OK | 1005 int bytes_written; // only valid when status is OK |
1008 int error_code; // only valid when status is ERROR | 1006 int error_code; // only valid when status is ERROR |
1009 }; | 1007 }; |
1010 }; | 1008 }; |
1011 | 1009 |
1012 } // namespace net | 1010 } // namespace net |
1013 | 1011 |
1014 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1012 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |