blob: fbf30696de7ccfa3903a25fd35fb6193ef5a2439 [file] [log] [blame]
bnc3fc60df2019-07-17 11:55:10 -07001// 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
bnc63becfb2019-07-29 10:19:53 -070010#include "net/third_party/quiche/src/quic/core/quic_types.h"
11
bnc3fc60df2019-07-17 11:55:10 -070012namespace quic {
13
14// Unidirectional stream types.
15
16// https://quicwg.org/base-drafts/draft-ietf-quic-http.html#unidirectional-streams
17const uint64_t kControlStream = 0x00;
18const uint64_t kServerPushStream = 0x01;
19// https://quicwg.org/base-drafts/draft-ietf-quic-qpack.html#enc-dec-stream-def
20const uint64_t kQpackEncoderStream = 0x02;
21const uint64_t kQpackDecoderStream = 0x03;
22
bnc63becfb2019-07-29 10:19:53 -070023// HTTP/3 and QPACK settings identifiers.
bnc3fc60df2019-07-17 11:55:10 -070024// https://quicwg.org/base-drafts/draft-ietf-quic-http.html#settings-parameters
bnc3fc60df2019-07-17 11:55:10 -070025// https://quicwg.org/base-drafts/draft-ietf-quic-qpack.html#configuration
bnc63becfb2019-07-29 10:19:53 -070026enum 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,
bnc63becfb2019-07-29 10:19:53 -070032};
33
34// Default maximum dynamic table capacity, communicated via
35// SETTINGS_QPACK_MAX_TABLE_CAPACITY.
36const QuicByteCount kDefaultQpackMaxDynamicTableCapacity = 64 * 1024; // 64 KB
bnc3fc60df2019-07-17 11:55:10 -070037
bnc57b5f622019-08-21 14:07:44 -070038// Default limit on number of blocked streams, communicated via
39// SETTINGS_QPACK_BLOCKED_STREAMS.
40const uint64_t kDefaultMaximumBlockedStreams = 100;
41
bnc3fc60df2019-07-17 11:55:10 -070042} // namespace quic
43
44#endif // QUICHE_QUIC_CORE_HTTP_HTTP_CONSTANTS_H_