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. | 52 // minus the IP and UDP headers. |
53 const QuicByteCount kMaxPacketSize = 1472; | 53 const QuicByteCount kMaxPacketSize = 1472; |
54 | 54 |
55 // Maximum size of the initial congestion window in packets. | 55 // Maximum size of the initial congestion window in packets. |
56 const size_t kDefaultInitialWindow = 10; | 56 const size_t kDefaultInitialWindow = 10; |
57 const size_t kMaxInitialWindow = 100; | 57 const size_t kMaxInitialWindow = 100; |
58 | 58 |
| 59 // Maximum size of the congestion window, in packets, for TCP congestion control |
| 60 // algorithms. |
| 61 const size_t kMaxTcpCongestionWindow = 200; |
| 62 |
59 // Don't allow a client to suggest an RTT longer than 15 seconds. | 63 // Don't allow a client to suggest an RTT longer than 15 seconds. |
60 const size_t kMaxInitialRoundTripTimeUs = 15 * kNumMicrosPerSecond; | 64 const size_t kMaxInitialRoundTripTimeUs = 15 * kNumMicrosPerSecond; |
61 | 65 |
62 // Maximum number of open streams per connection. | 66 // Maximum number of open streams per connection. |
63 const size_t kDefaultMaxStreamsPerConnection = 100; | 67 const size_t kDefaultMaxStreamsPerConnection = 100; |
64 | 68 |
65 // Number of bytes reserved for public flags in the packet header. | 69 // Number of bytes reserved for public flags in the packet header. |
66 const size_t kPublicFlagsSize = 1; | 70 const size_t kPublicFlagsSize = 1; |
67 // Number of bytes reserved for version number in the packet header. | 71 // Number of bytes reserved for version number in the packet header. |
68 const size_t kQuicVersionSize = 4; | 72 const size_t kQuicVersionSize = 4; |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 WriteStatus status; | 938 WriteStatus status; |
935 union { | 939 union { |
936 int bytes_written; // only valid when status is OK | 940 int bytes_written; // only valid when status is OK |
937 int error_code; // only valid when status is ERROR | 941 int error_code; // only valid when status is ERROR |
938 }; | 942 }; |
939 }; | 943 }; |
940 | 944 |
941 } // namespace net | 945 } // namespace net |
942 | 946 |
943 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 947 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |