QHttpServerConfiguration Class
The QHttpServerConfiguration class controls server parameters. More...
Header: | #include <QHttpServerConfiguration> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS HttpServer) target_link_libraries(mytarget PRIVATE Qt6::HttpServer) |
qmake: | QT += httpserver |
Since: | Qt 6.9 |
Public Functions
QHttpServerConfiguration() | |
QHttpServerConfiguration(const QHttpServerConfiguration &other) | |
QHttpServerConfiguration(QHttpServerConfiguration &&other) | |
~QHttpServerConfiguration() | |
quint32 | rateLimitPerSecond() const |
void | setRateLimitPerSecond(quint32 maxRequests) |
void | swap(QHttpServerConfiguration &other) |
QHttpServerConfiguration & | operator=(QHttpServerConfiguration &&other) |
QHttpServerConfiguration & | operator=(const QHttpServerConfiguration &other) |
Related Non-Members
bool | operator!=(const QHttpServerConfiguration &lhs, const QHttpServerConfiguration &rhs) |
bool | operator==(const QHttpServerConfiguration &lhs, const QHttpServerConfiguration &rhs) |
Detailed Description
Member Function Documentation
QHttpServerConfiguration::QHttpServerConfiguration()
Default constructs a QHttpServerConfiguration object.
Such a configuration has the following values:
- Rate limit is disabled
QHttpServerConfiguration::QHttpServerConfiguration(const QHttpServerConfiguration &other)
Copy-constructs this QHttpServerConfiguration.
[noexcept]
QHttpServerConfiguration::QHttpServerConfiguration(QHttpServerConfiguration &&other)
Move-constructs this QHttpServerConfiguration from other
[noexcept]
QHttpServerConfiguration::~QHttpServerConfiguration()
Destructor.
quint32 QHttpServerConfiguration::rateLimitPerSecond() const
Returns maximum number of incoming requests per second per IP accepted by the server.
See also setRateLimitPerSecond().
void QHttpServerConfiguration::setRateLimitPerSecond(quint32 maxRequests)
Sets maxRequests as the maximum number of incoming requests per second per IP that will be accepted by QHttpServer. If the limit is exceeded, QHttpServer will respond with QHttpServerResponder::StatusCode::TooManyRequests.
See also rateLimitPerSecond() and QHttpServerResponder::StatusCode.
[noexcept]
void QHttpServerConfiguration::swap(QHttpServerConfiguration &other)
Swaps this configuration with other. This operation is very fast and never fails.
[noexcept]
QHttpServerConfiguration &QHttpServerConfiguration::operator=(QHttpServerConfiguration &&other)
Move-assigns other to this QHttpServerConfiguration.
QHttpServerConfiguration &QHttpServerConfiguration::operator=(const QHttpServerConfiguration &other)
Copy-assigns other to this QHttpServerConfiguration.
Related Non-Members
[noexcept]
bool operator!=(const QHttpServerConfiguration &lhs, const QHttpServerConfiguration &rhs)
Returns true
if lhs and rhs do not have the same set of configuration parameters.
[noexcept]
bool operator==(const QHttpServerConfiguration &lhs, const QHttpServerConfiguration &rhs)
Returns true
if lhs and rhs have the same set of configuration parameters.