Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: net/quic/core/quic_protocol.h

Issue 2430513002: Limit QUIC uncompressed header size per stream to 16K, by default. Protected by FLAGS_quic_limit_un… (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_headers_stream_test.cc ('k') | net/quic/core/quic_spdy_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // We match SPDY's use of 32 (since we'd compete with SPDY). 68 // We match SPDY's use of 32 (since we'd compete with SPDY).
69 const QuicPacketCount kInitialCongestionWindow = 32; 69 const QuicPacketCount kInitialCongestionWindow = 32;
70 70
71 // Minimum size of initial flow control window, for both stream and session. 71 // Minimum size of initial flow control window, for both stream and session.
72 const uint32_t kMinimumFlowControlSendWindow = 16 * 1024; // 16 KB 72 const uint32_t kMinimumFlowControlSendWindow = 16 * 1024; // 16 KB
73 73
74 // Maximum flow control receive window limits for connection and stream. 74 // Maximum flow control receive window limits for connection and stream.
75 const QuicByteCount kStreamReceiveWindowLimit = 16 * 1024 * 1024; // 16 MB 75 const QuicByteCount kStreamReceiveWindowLimit = 16 * 1024 * 1024; // 16 MB
76 const QuicByteCount kSessionReceiveWindowLimit = 24 * 1024 * 1024; // 24 MB 76 const QuicByteCount kSessionReceiveWindowLimit = 24 * 1024 * 1024; // 24 MB
77 77
78 // Default limit on the size of uncompressed headers.
79 const QuicByteCount kDefaultMaxUncompressedHeaderSize = 16 * 1024; // 16 KB
80
81 // Minimum size of the CWND, in packets, when doing bandwidth resumption.
82 const QuicPacketCount kMinCongestionWindowForBandwidthResumption = 10;
83
78 // Maximum number of tracked packets. 84 // Maximum number of tracked packets.
79 const QuicPacketCount kMaxTrackedPackets = 10000; 85 const QuicPacketCount kMaxTrackedPackets = 10000;
80 86
81 // Default size of the socket receive buffer in bytes. 87 // Default size of the socket receive buffer in bytes.
82 const QuicByteCount kDefaultSocketReceiveBuffer = 1024 * 1024; 88 const QuicByteCount kDefaultSocketReceiveBuffer = 1024 * 1024;
83 89
84 // Don't allow a client to suggest an RTT shorter than 10ms. 90 // Don't allow a client to suggest an RTT shorter than 10ms.
85 const uint32_t kMinInitialRoundTripTimeUs = 10 * kNumMicrosPerMilli; 91 const uint32_t kMinInitialRoundTripTimeUs = 10 * kNumMicrosPerMilli;
86 92
87 // Don't allow a client to suggest an RTT longer than 15 seconds. 93 // Don't allow a client to suggest an RTT longer than 15 seconds.
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 // Server is not authoritative for this URL. 480 // Server is not authoritative for this URL.
475 QUIC_UNAUTHORIZED_PROMISE_URL, 481 QUIC_UNAUTHORIZED_PROMISE_URL,
476 // Can't have more than one active PUSH_PROMISE per URL. 482 // Can't have more than one active PUSH_PROMISE per URL.
477 QUIC_DUPLICATE_PROMISE_URL, 483 QUIC_DUPLICATE_PROMISE_URL,
478 // Vary check failed. 484 // Vary check failed.
479 QUIC_PROMISE_VARY_MISMATCH, 485 QUIC_PROMISE_VARY_MISMATCH,
480 // Only GET and HEAD methods allowed. 486 // Only GET and HEAD methods allowed.
481 QUIC_INVALID_PROMISE_METHOD, 487 QUIC_INVALID_PROMISE_METHOD,
482 // The push stream is unclaimed and timed out. 488 // The push stream is unclaimed and timed out.
483 QUIC_PUSH_STREAM_TIMED_OUT, 489 QUIC_PUSH_STREAM_TIMED_OUT,
490 // Received headers were too large.
491 QUIC_HEADERS_TOO_LARGE,
484 // No error. Used as bound while iterating. 492 // No error. Used as bound while iterating.
485 QUIC_STREAM_LAST_ERROR, 493 QUIC_STREAM_LAST_ERROR,
486 }; 494 };
487 // QUIC error codes are encoded to a single octet on-the-wire. 495 // QUIC error codes are encoded to a single octet on-the-wire.
488 static_assert(static_cast<int>(QUIC_STREAM_LAST_ERROR) <= 496 static_assert(static_cast<int>(QUIC_STREAM_LAST_ERROR) <=
489 std::numeric_limits<uint8_t>::max(), 497 std::numeric_limits<uint8_t>::max(),
490 "QuicErrorCode exceeds single octet"); 498 "QuicErrorCode exceeds single octet");
491 499
492 // These values must remain stable as they are uploaded to UMA histograms. 500 // These values must remain stable as they are uploaded to UMA histograms.
493 // To add a new error code, use the current value of QUIC_LAST_ERROR and 501 // To add a new error code, use the current value of QUIC_LAST_ERROR and
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 : iov(iov), iov_count(iov_count), total_length(total_length) {} 1519 : iov(iov), iov_count(iov_count), total_length(total_length) {}
1512 1520
1513 const struct iovec* iov; 1521 const struct iovec* iov;
1514 const int iov_count; 1522 const int iov_count;
1515 const size_t total_length; 1523 const size_t total_length;
1516 }; 1524 };
1517 1525
1518 } // namespace net 1526 } // namespace net
1519 1527
1520 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1528 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_headers_stream_test.cc ('k') | net/quic/core/quic_spdy_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698