summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnection_p.h
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-08-17 14:15:18 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-08-20 08:52:37 (GMT)
commit67376be28ca51930ff0f4fad2dd58f53968655a9 (patch)
tree06da6fb0a834d3cbd70147098476f32d06cbd48b /src/network/access/qhttpnetworkconnection_p.h
parent09138f1f4eb45c196506ab94a455dc47cec3575a (diff)
downloadQt-67376be28ca51930ff0f4fad2dd58f53968655a9.zip
Qt-67376be28ca51930ff0f4fad2dd58f53968655a9.tar.gz
Qt-67376be28ca51930ff0f4fad2dd58f53968655a9.tar.bz2
QNAM HTTP Pipelining
HTTP Pipelining should improve the performance of HTTP requests for high latency network links. Since some servers/proxies could have problems with it, it is disabled by default. Set the HttpPipeliningAllowed attribute of a QNetworkRequest to enable it for that request. Reviewed-by: Thiago
Diffstat (limited to 'src/network/access/qhttpnetworkconnection_p.h')
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h
index 3f928ec..af764ed 100644
--- a/src/network/access/qhttpnetworkconnection_p.h
+++ b/src/network/access/qhttpnetworkconnection_p.h
@@ -155,6 +155,8 @@ class QHttpNetworkConnectionPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QHttpNetworkConnection)
public:
static const int defaultChannelCount;
+ static const int defaultPipelineLength;
+
QHttpNetworkConnectionPrivate(const QString &hostName, quint16 port, bool encrypt);
QHttpNetworkConnectionPrivate(quint16 channelCount, const QString &hostName, quint16 port, bool encrypt);
~QHttpNetworkConnectionPrivate();
@@ -169,9 +171,12 @@ public:
bool isSocketReading(QAbstractSocket *socket) const;
QHttpNetworkReply *queueRequest(const QHttpNetworkRequest &request);
- void unqueueAndSendRequest(QAbstractSocket *socket);
+ void requeueRequest(const HttpMessagePair &pair); // e.g. after pipeline broke
+ void dequeueAndSendRequest(QAbstractSocket *socket);
void prepareRequest(HttpMessagePair &request);
- void resendCurrentRequest(QAbstractSocket *socket);
+
+ void fillPipeline(QAbstractSocket *socket);
+ bool fillPipeline(QList<HttpMessagePair> &queue, QHttpNetworkConnectionChannel &channel);
void copyCredentials(int fromChannel, QAuthenticator *auth, bool isProxy);
@@ -212,6 +217,7 @@ public:
#ifndef QT_NO_NETWORKPROXY
QNetworkProxy networkProxy;
+ void emitProxyAuthenticationRequired(const QHttpNetworkConnectionChannel *chan, const QNetworkProxy &proxy, QAuthenticator* auth);
#endif
//The request queues