Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QHttp1Configuration Class Reference

The QHttp1Configuration class controls HTTP/1 parameters and settings. More...

#include <qhttp1configuration.h>

Collaboration diagram for QHttp1Configuration:

Public Member Functions

Q_NETWORK_EXPORT QHttp1Configuration ()
 Default constructs a QHttp1Configuration object.
Q_NETWORK_EXPORT QHttp1Configuration (const QHttp1Configuration &other)
 Copy-constructs this QHttp1Configuration.
 QHttp1Configuration (QHttp1Configuration &&other) noexcept
 Move-constructs this QHttp1Configuration from other.
Q_NETWORK_EXPORT QHttp1Configurationoperator= (const QHttp1Configuration &other)
 Copy-assigns other to this QHttp1Configuration.
Q_NETWORK_EXPORT ~QHttp1Configuration ()
 Destructor.
Q_NETWORK_EXPORT void setNumberOfConnectionsPerHost (qsizetype amount)
 Sets the number of connections (minimum: 1; maximum: 255) used per http(s) {host}:{port} combination to number.
Q_NETWORK_EXPORT qsizetype numberOfConnectionsPerHost () const
 Returns the number of connections used per http(s) {host}:{port} combination.
void swap (QHttp1Configuration &other) noexcept
 \memberswap{HTTP/1 configuration}

Friends

bool operator== (const QHttp1Configuration &lhs, const QHttp1Configuration &rhs) noexcept
bool operator!= (const QHttp1Configuration &lhs, const QHttp1Configuration &rhs) noexcept
size_t qHash (const QHttp1Configuration &key, size_t seed=0) noexcept

Detailed Description

The QHttp1Configuration class controls HTTP/1 parameters and settings.

Since
6.5

\reentrant \inmodule QtNetwork

QHttp1Configuration controls HTTP/1 parameters and settings that QNetworkAccessManager will use to send requests and process responses.

Note
The configuration must be set before the first request was sent to a given host (and thus an HTTP/1 session established).
See also
QNetworkRequest::setHttp1Configuration(), QNetworkRequest::http1Configuration(), QNetworkAccessManager

Definition at line 22 of file qhttp1configuration.h.

Constructor & Destructor Documentation

◆ QHttp1Configuration() [1/3]

QHttp1Configuration::QHttp1Configuration ( )

Default constructs a QHttp1Configuration object.

Definition at line 39 of file qhttp1configuration.cpp.

◆ QHttp1Configuration() [2/3]

QHttp1Configuration::QHttp1Configuration ( const QHttp1Configuration & other)
default

Copy-constructs this QHttp1Configuration.

◆ QHttp1Configuration() [3/3]

QHttp1Configuration::QHttp1Configuration ( QHttp1Configuration && other)
inlinenoexcept

Move-constructs this QHttp1Configuration from other.

Note
The moved-from object other is placed in a partially-formed state, in which the only valid operations are destruction and assignment of a new value.

Definition at line 27 of file qhttp1configuration.h.

◆ ~QHttp1Configuration()

QHttp1Configuration::~QHttp1Configuration ( )
default

Destructor.

Member Function Documentation

◆ numberOfConnectionsPerHost()

qsizetype QHttp1Configuration::numberOfConnectionsPerHost ( ) const

Returns the number of connections used per http(s) {host}:{port} combination.

The default is six (6).

See also
setNumberOfConnectionsPerHost

Definition at line 104 of file qhttp1configuration.cpp.

◆ operator=()

QHttp1Configuration & QHttp1Configuration::operator= ( const QHttp1Configuration & other)
default

Copy-assigns other to this QHttp1Configuration.

Move-assigns other to this QHttp1Configuration.

Note
The moved-from object other is placed in a partially-formed state, in which the only valid operations are destruction and assignment of a new value.

◆ setNumberOfConnectionsPerHost()

void QHttp1Configuration::setNumberOfConnectionsPerHost ( qsizetype number)

Sets the number of connections (minimum: 1; maximum: 255) used per http(s) {host}:{port} combination to number.

If number is ≤ 0, does nothing. If number is > 255, 255 is used.

See also
numberOfConnectionsPerHost

Definition at line 90 of file qhttp1configuration.cpp.

◆ swap()

void QHttp1Configuration::swap ( QHttp1Configuration & other)
inlinenoexcept

\memberswap{HTTP/1 configuration}

Definition at line 38 of file qhttp1configuration.h.

◆ operator!=

bool operator!= ( const QHttp1Configuration & lhs,
const QHttp1Configuration & rhs )
friend
Since
6.5

Returns true if lhs and rhs do not represent the same set of HTTP/1 parameters.

Definition at line 57 of file qhttp1configuration.h.

◆ operator==

bool operator== ( const QHttp1Configuration & lhs,
const QHttp1Configuration & rhs )
friend
Since
6.5

Returns true if lhs and rhs represent the same set of HTTP/1 parameters.

Definition at line 55 of file qhttp1configuration.h.

◆ qHash

size_t qHash ( const QHttp1Configuration & key,
size_t seed = 0 )
friend
Since
6.5 \qhash{QHttp1Configuration}

Definition at line 60 of file qhttp1configuration.h.


The documentation for this class was generated from the following files: