Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qhttp1configuration.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
6#include <QtCore/private/qnumeric_p.h>
7#include <QtCore/qhashfunctions.h>
8
10
11// QHttp1ConfigurationPrivate is unused until we need it:
12static_assert(sizeof(QHttp1Configuration) == sizeof(void*),
13 "You have added too many members to QHttp1Configuration::ShortData. "
14 "Decrease their size or switch to using a d-pointer.");
15
39 : u(ShortData{6, {}}) // QHttpNetworkConnectionPrivate::defaultHttpChannelCount
40{
41}
42
47 = default;
48
63 = default;
64
79 = default;
80
90{
91 auto n = qt_saturate<std::uint8_t>(number);
92 if (n == 0)
93 return;
94 u.data.numConnectionsPerHost = n;
95}
96
104{
105 return u.data.numConnectionsPerHost;
106}
107
141bool QHttp1Configuration::equals(const QHttp1Configuration &other) const noexcept
142{
143 return u.data.numConnectionsPerHost == other.u.data.numConnectionsPerHost;
144}
145
149size_t QHttp1Configuration::hash(size_t seed) const noexcept
150{
151 return qHash(u.data.numConnectionsPerHost, seed);
152}
153
The QHttp1Configuration class controls HTTP/1 parameters and settings.
Q_NETWORK_EXPORT QHttp1Configuration()
Default constructs a QHttp1Configuration object.
Q_NETWORK_EXPORT void setNumberOfConnectionsPerHost(qsizetype amount)
Sets the number of connections (minimum: 1; maximum: 255) used per http(s) {host}:{port} combination ...
Q_NETWORK_EXPORT ~QHttp1Configuration()
Destructor.
Q_NETWORK_EXPORT QHttp1Configuration & operator=(const QHttp1Configuration &other)
Copy-assigns other to this QHttp1Configuration.
Q_NETWORK_EXPORT qsizetype numberOfConnectionsPerHost() const
Returns the number of connections used per http(s) {host}:{port} combination.
Combined button and popup list for selecting options.
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
GLfloat n
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
Definition qrandom.cpp:196
ptrdiff_t qsizetype
Definition qtypes.h:165
QSharedPointer< T > other(t)
[5]