65 ConnectionTypeHTTP2Direct
68 QHttpNetworkConnection(quint16 channelCount,
const QString &hostName, quint16 port = 80,
69 bool encrypt =
false,
bool isLocalSocket =
false,
70 QObject *parent =
nullptr,
71 ConnectionType connectionType = ConnectionTypeHTTP);
72 ~QHttpNetworkConnection();
75 QString hostName()
const;
80 QHttpNetworkReply* sendRequest(
const QHttpNetworkRequest &request);
81 void fillHttp2Queue();
83#ifndef QT_NO_NETWORKPROXY
85 void setCacheProxy(
const QNetworkProxy &networkProxy);
86 QNetworkProxy cacheProxy()
const;
87 void setTransparentProxy(
const QNetworkProxy &networkProxy);
88 QNetworkProxy transparentProxy()
const;
93 QHttpNetworkConnectionChannel *channels()
const;
95 ConnectionType connectionType()
const;
96 void setConnectionType(ConnectionType type);
98 QHttp2Configuration http2Parameters()
const;
99 void setHttp2Parameters(
const QHttp2Configuration ¶ms);
102 void setSslConfiguration(
const QSslConfiguration &config);
103 void ignoreSslErrors(
int channel = -1);
104 void ignoreSslErrors(
const QList<QSslError> &errors,
int channel = -1);
105 std::shared_ptr<QSslContext> sslContext()
const;
106 void setSslContext(std::shared_ptr<QSslContext> context);
109 void preConnectFinished();
111 QString peerVerifyName()
const;
112 void setPeerVerifyName(
const QString &peerName);
115 void onlineStateChanged(
bool isOnline);
118 Q_DECLARE_PRIVATE(QHttpNetworkConnection)
119 Q_DISABLE_COPY_MOVE(QHttpNetworkConnection)
120 friend class QHttpThreadDelegate;
121 friend class QHttpNetworkReply;
122 friend class QHttpNetworkReplyPrivate;
123 friend class QHttpNetworkConnectionChannel;
124 friend class QHttp2ProtocolHandler;
125 friend class QHttpProtocolHandler;
127 Q_PRIVATE_SLOT(d_func(),
void _q_startNextRequest())
128 Q_PRIVATE_SLOT(d_func(),
void _q_hostLookupFinished(QHostInfo))
129 Q_PRIVATE_SLOT(d_func(),
void _q_connectDelayedChannel())
139 Q_DECLARE_PUBLIC(QHttpNetworkConnection)
160 QHttpNetworkConnectionPrivate(quint16 connectionCount,
const QString &hostName, quint16 port,
161 bool encrypt,
bool isLocalSocket,
162 QHttpNetworkConnection::ConnectionType type);
173 int indexOf(QIODevice *socket)
const;
175 QHttpNetworkReply *
queueRequest(
const QHttpNetworkRequest &request);
185 bool fillPipeline(QList<HttpMessagePair> &queue, QHttpNetworkConnectionChannel &channel);
190 void copyCredentials(
int fromChannel, QAuthenticator *auth,
bool isProxy);
204 QString errorDetail(QNetworkReply::NetworkError errorCode, QIODevice *socket,
205 const QString &extraDetail = QString());
227 void emitReplyError(QIODevice *socket, QHttpNetworkReply *reply, QNetworkReply::NetworkError errorCode);
237#ifndef QT_NO_NETWORKPROXY
239 void emitProxyAuthenticationRequired(
const QHttpNetworkConnectionChannel *chan,
const QNetworkProxy &proxy, QAuthenticator* auth);