diff options
author | Frans Englich <frans.englich@nokia.com> | 2009-10-16 08:11:14 (GMT) |
---|---|---|
committer | Frans Englich <frans.englich@nokia.com> | 2009-10-16 08:11:14 (GMT) |
commit | 4f48e43dc4f8237875d7d4a61bf4e55ab92e3941 (patch) | |
tree | 0436d256b8812a5ff638d799710d3b20b4459716 /src/network | |
parent | 9935ad5366463429ed4aa9b8db03c4605586f866 (diff) | |
parent | 2348200bfb277450cb2e79f6054d95b3041b10db (diff) | |
download | Qt-4f48e43dc4f8237875d7d4a61bf4e55ab92e3941.zip Qt-4f48e43dc4f8237875d7d4a61bf4e55ab92e3941.tar.gz Qt-4f48e43dc4f8237875d7d4a61bf4e55ab92e3941.tar.bz2 |
Merge commit 'origin/4.6' into mmfphonon
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 12 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel_p.h | 1 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket.cpp | 7 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 81fac57..6962ab3 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -105,6 +105,9 @@ void QHttpNetworkConnectionChannel::init() QObject::connect(sslSocket, SIGNAL(sslErrors(const QList<QSslError>&)), this, SLOT(_q_sslErrors(const QList<QSslError>&)), Qt::DirectConnection); + QObject::connect(sslSocket, SIGNAL(encryptedBytesWritten(qint64)), + this, SLOT(_q_encryptedBytesWritten(qint64)), + Qt::DirectConnection); } #endif } @@ -881,6 +884,15 @@ void QHttpNetworkConnectionChannel::_q_sslErrors(const QList<QSslError> &errors) //QNetworkReply::NetworkError errorCode = QNetworkReply::ProtocolFailure; emit connection->sslErrors(errors); } + +void QHttpNetworkConnectionChannel::_q_encryptedBytesWritten(qint64 bytes) +{ + Q_UNUSED(bytes); + // bytes have been written to the socket. write even more of them :) + if (isSocketWriting()) + sendRequest(); + // otherwise we do nothing +} #endif QT_END_NAMESPACE diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h index 1d1153e..127a431 100644 --- a/src/network/access/qhttpnetworkconnectionchannel_p.h +++ b/src/network/access/qhttpnetworkconnectionchannel_p.h @@ -180,6 +180,7 @@ public: #ifndef QT_NO_OPENSSL void _q_encrypted(); // start sending request (https) void _q_sslErrors(const QList<QSslError> &errors); // ssl errors from the socket + void _q_encryptedBytesWritten(qint64 bytes); // proceed sending #endif }; diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index 0e9cb4f..a5732fb 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -149,6 +149,13 @@ This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (\l{http://www.openssl.org/}). + \note Be aware of the difference between the bytesWritten() signal and + the encryptedBytesWritten() signal. For a QTcpSocket, bytesWritten() + will get emitted as soon as data has been written to the TCP socket. + For a QSslSocket, bytesWritten() will get emitted when the data + is being encrypted and encryptedBytesWritten() + will get emitted as soon as data has been written to the TCP socket. + \sa QSslCertificate, QSslCipher, QSslError */ |