bnc | 3fc60df | 2019-07-17 11:55:10 -0700 | [diff] [blame] | 1 | // Copyright (c) 2019 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef QUICHE_QUIC_CORE_HTTP_HTTP_CONSTANTS_H_ |
| 6 | #define QUICHE_QUIC_CORE_HTTP_HTTP_CONSTANTS_H_ |
| 7 | |
| 8 | #include <cstdint> |
| 9 | |
bnc | 63becfb | 2019-07-29 10:19:53 -0700 | [diff] [blame] | 10 | #include "net/third_party/quiche/src/quic/core/quic_types.h" |
| 11 | |
bnc | 3fc60df | 2019-07-17 11:55:10 -0700 | [diff] [blame] | 12 | namespace quic { |
| 13 | |
| 14 | // Unidirectional stream types. |
| 15 | |
| 16 | // https://quicwg.org/base-drafts/draft-ietf-quic-http.html#unidirectional-streams |
| 17 | const uint64_t kControlStream = 0x00; |
| 18 | const uint64_t kServerPushStream = 0x01; |
| 19 | // https://quicwg.org/base-drafts/draft-ietf-quic-qpack.html#enc-dec-stream-def |
| 20 | const uint64_t kQpackEncoderStream = 0x02; |
| 21 | const uint64_t kQpackDecoderStream = 0x03; |
| 22 | |
bnc | 63becfb | 2019-07-29 10:19:53 -0700 | [diff] [blame] | 23 | // HTTP/3 and QPACK settings identifiers. |
bnc | 3fc60df | 2019-07-17 11:55:10 -0700 | [diff] [blame] | 24 | // https://quicwg.org/base-drafts/draft-ietf-quic-http.html#settings-parameters |
bnc | 3fc60df | 2019-07-17 11:55:10 -0700 | [diff] [blame] | 25 | // https://quicwg.org/base-drafts/draft-ietf-quic-qpack.html#configuration |
bnc | 63becfb | 2019-07-29 10:19:53 -0700 | [diff] [blame] | 26 | enum Http3AndQpackSettingsIdentifiers : uint64_t { |
| 27 | // Same value as spdy::SETTINGS_HEADER_TABLE_SIZE. |
| 28 | SETTINGS_QPACK_MAX_TABLE_CAPACITY = 0x01, |
| 29 | // Same value as spdy::SETTINGS_MAX_HEADER_LIST_SIZE. |
| 30 | SETTINGS_MAX_HEADER_LIST_SIZE = 0x06, |
| 31 | SETTINGS_QPACK_BLOCKED_STREAMS = 0x07, |
bnc | 63becfb | 2019-07-29 10:19:53 -0700 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | // Default maximum dynamic table capacity, communicated via |
| 35 | // SETTINGS_QPACK_MAX_TABLE_CAPACITY. |
| 36 | const QuicByteCount kDefaultQpackMaxDynamicTableCapacity = 64 * 1024; // 64 KB |
bnc | 3fc60df | 2019-07-17 11:55:10 -0700 | [diff] [blame] | 37 | |
bnc | 57b5f62 | 2019-08-21 14:07:44 -0700 | [diff] [blame] | 38 | // Default limit on number of blocked streams, communicated via |
| 39 | // SETTINGS_QPACK_BLOCKED_STREAMS. |
| 40 | const uint64_t kDefaultMaximumBlockedStreams = 100; |
| 41 | |
bnc | 3fc60df | 2019-07-17 11:55:10 -0700 | [diff] [blame] | 42 | } // namespace quic |
| 43 | |
| 44 | #endif // QUICHE_QUIC_CORE_HTTP_HTTP_CONSTANTS_H_ |