summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkreply_p.h
diff options
context:
space:
mode:
authorPeter Hartmann <phartmann@blackberry.com>2014-01-22 14:54:21 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-19 21:44:15 +0100
commit1de244ea65f1b40c488fe92b29170c1b1d447233 (patch)
treea01d233e33847cf8709b6130ad7fa4656ff348de /src/network/access/qhttpnetworkreply_p.h
parent42789d04a3078652594b8e06f520d7dd5e8021c5 (diff)
network: add support for the SPDY protocol
Currently the only supported SPDY version is 3.0. The feature needs to be enabled explicitly via QNetworkRequest::SpdyAllowedAttribute. Whether SPDY actually was used can be determined via QNetworkRequest::SpdyWasUsedAttribute from a QNetworkReply once it has been started (i.e. after the encrypted() signal has been received). Whether SPDY can be used will be determined during the SSL handshake through the TLS NPN extension (see separate commit). The following things from SPDY have not been enabled currently: * server push is not implemented, it has never been seen in the wild; in that case we just reject a stream pushed by the server, which is legit. * settings are not persisted across SPDY sessions. In practice this means that the server sends a small message upon session start telling us e.g. the number of concurrent connections. * SSL client certificates are not supported. Task-number: QTBUG-18714 [ChangeLog][QtNetwork] Added support for the SPDY protocol (version 3.0). Change-Id: I81bbe0495c24ed84e9cf8af3a9dbd63ca1e93d0d Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network/access/qhttpnetworkreply_p.h')
-rw-r--r--src/network/access/qhttpnetworkreply_p.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h
index 583c3e426f..e15ace0072 100644
--- a/src/network/access/qhttpnetworkreply_p.h
+++ b/src/network/access/qhttpnetworkreply_p.h
@@ -132,6 +132,8 @@ public:
bool isFinished() const;
bool isPipeliningUsed() const;
+ bool isSpdyUsed() const;
+ void setSpdyWasUsed(bool spdy);
QHttpNetworkConnection* connection();
@@ -165,6 +167,7 @@ private:
friend class QHttpNetworkConnectionPrivate;
friend class QHttpNetworkConnectionChannel;
friend class QHttpProtocolHandler;
+ friend class QSpdyProtocolHandler;
};
@@ -205,7 +208,11 @@ public:
ReadingStatusState,
ReadingHeaderState,
ReadingDataState,
- AllDoneState
+ AllDoneState,
+ SPDYSYNSent,
+ SPDYUploading,
+ SPDYHalfClosed,
+ SPDYClosed
} state;
QHttpNetworkRequest request;
@@ -226,6 +233,11 @@ public:
qint64 currentChunkSize;
qint64 currentChunkRead;
qint64 readBufferMaxSize;
+ qint32 windowSizeDownload; // only for SPDY
+ qint32 windowSizeUpload; // only for SPDY
+ qint32 currentlyReceivedDataInWindow; // only for SPDY
+ qint32 currentlyUploadedDataInWindow; // only for SPDY
+ qint64 totallyUploadedData; // only for SPDY
QPointer<QHttpNetworkConnection> connection;
QPointer<QHttpNetworkConnectionChannel> connectionChannel;
@@ -236,12 +248,14 @@ public:
bool requestIsPrepared;
bool pipeliningUsed;
+ bool spdyUsed;
bool downstreamLimited;
char* userProvidedDownloadBuffer;
#ifndef QT_NO_COMPRESS
z_stream_s *inflateStrm;
+ int initializeInflateStream();
qint64 uncompressBodyData(QByteDataBuffer *in, QByteDataBuffer *out);
#endif
};