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 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
 Swaps this HTTP/1 configuration with other.
 

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 17 of file qhttp1configuration.h.

Constructor & Destructor Documentation

◆ QHttp1Configuration() [1/3]

QHttp1Configuration::QHttp1Configuration ( )

Default constructs a QHttp1Configuration object.

Definition at line 38 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 22 of file qhttp1configuration.h.

References other().

+ Here is the call graph for this function:

◆ ~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 103 of file qhttp1configuration.cpp.

Referenced by QHttpThreadDelegate::startRequest().

+ Here is the caller graph for this function:

◆ 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 89 of file qhttp1configuration.cpp.

References number.

◆ swap()

void QHttp1Configuration::swap ( QHttp1Configuration & other)
inlinenoexcept

Swaps this HTTP/1 configuration with other.

This operation is very fast and never fails.

Definition at line 33 of file qhttp1configuration.h.

References other().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

bool QHttp1Configuration::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 52 of file qhttp1configuration.h.

◆ operator==

bool QHttp1Configuration::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 50 of file qhttp1configuration.h.

◆ qHash

size_t QHttp1Configuration::qHash ( const QHttp1Configuration & key,
size_t seed = 0 )
friend
Since
6.5

Returns the hash value for the key, using seed to seed the calculation.

Definition at line 55 of file qhttp1configuration.h.


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