cutelyst 4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
hpack.h
1/*
2 * SPDX-FileCopyrightText: (C) 2018 Daniel Nicoletti <dantti12@gmail.com>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#ifndef HPACKTABLES_H
6#define HPACKTABLES_H
7
8#include <Cutelyst/Headers>
9
10#include <QHash>
11#include <QString>
12#include <QVector>
13
14namespace Cutelyst {
15
17 QByteArray key;
18 QByteArray value;
19};
20
21class Headers;
22class ServerEngine;
23class H2Stream;
24class HPack
25{
26public:
27 HPack(int maxTableSize);
28 ~HPack();
29
30 void encodeHeaders(int status, const Headers &headers, QByteArray &buf, ServerEngine *engine);
31
32 int decode(unsigned char *it, unsigned char *itEnd, H2Stream *stream);
33
34private:
35 QVector<DynamicTableEntry> m_dynamicTable;
36 int m_dynamicTableSize = 0;
37 int m_currentMaxDynamicTableSize = 0;
38 int m_maxTableSize;
39};
40
41} // namespace Cutelyst
42
43#endif // HPACKTABLES_H
Container for HTTP headers.
Definition headers.h:24
The Cutelyst namespace holds all public Cutelyst API.