| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // Default and initial maximum size in bytes of a QUIC packet. | 49 // Default and initial maximum size in bytes of a QUIC packet. |
| 50 const QuicByteCount kDefaultMaxPacketSize = 1200; | 50 const QuicByteCount kDefaultMaxPacketSize = 1200; |
| 51 // The maximum packet size of any QUIC packet, based on ethernet's max size, | 51 // The maximum packet size of any QUIC packet, based on ethernet's max size, |
| 52 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an | 52 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an |
| 53 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's | 53 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's |
| 54 // max packet size is 1500 bytes, 1500 - 48 = 1452. | 54 // max packet size is 1500 bytes, 1500 - 48 = 1452. |
| 55 const QuicByteCount kMaxPacketSize = 1452; | 55 const QuicByteCount kMaxPacketSize = 1452; |
| 56 | 56 |
| 57 // Maximum size of the initial congestion window in packets. | 57 // Maximum size of the initial congestion window in packets. |
| 58 const size_t kDefaultInitialWindow = 10; | 58 const size_t kDefaultInitialWindow = 10; |
| 59 const size_t kMaxInitialWindow = 100; | 59 // TODO(ianswett): Temporarily changed to 10 due to a large number of clients |
| 60 // mistakenly negotiating 100 initially and suffering the consequences. |
| 61 const size_t kMaxInitialWindow = 10; |
| 60 | 62 |
| 61 // Maximum size of the congestion window, in packets, for TCP congestion control | 63 // Maximum size of the congestion window, in packets, for TCP congestion control |
| 62 // algorithms. | 64 // algorithms. |
| 63 const size_t kMaxTcpCongestionWindow = 200; | 65 const size_t kMaxTcpCongestionWindow = 200; |
| 64 | 66 |
| 65 // Don't allow a client to suggest an RTT longer than 15 seconds. | 67 // Don't allow a client to suggest an RTT longer than 15 seconds. |
| 66 const size_t kMaxInitialRoundTripTimeUs = 15 * kNumMicrosPerSecond; | 68 const size_t kMaxInitialRoundTripTimeUs = 15 * kNumMicrosPerSecond; |
| 67 | 69 |
| 68 // Maximum number of open streams per connection. | 70 // Maximum number of open streams per connection. |
| 69 const size_t kDefaultMaxStreamsPerConnection = 100; | 71 const size_t kDefaultMaxStreamsPerConnection = 100; |
| (...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 WriteStatus status; | 949 WriteStatus status; |
| 948 union { | 950 union { |
| 949 int bytes_written; // only valid when status is OK | 951 int bytes_written; // only valid when status is OK |
| 950 int error_code; // only valid when status is ERROR | 952 int error_code; // only valid when status is ERROR |
| 951 }; | 953 }; |
| 952 }; | 954 }; |
| 953 | 955 |
| 954 } // namespace net | 956 } // namespace net |
| 955 | 957 |
| 956 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 958 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |