summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/ssl/qsslsocket.cpp')
-rw-r--r--src/network/ssl/qsslsocket.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 5c9ebac283..84c814cca4 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -2647,6 +2647,20 @@ QByteArray QSslSocketPrivate::peek(qint64 maxSize)
/*!
\internal
*/
+qint64 QSslSocketPrivate::skip(qint64 maxSize)
+{
+ if (mode == QSslSocket::UnencryptedMode && !autoStartHandshake)
+ return plainSocket->skip(maxSize);
+
+ // In encrypted mode, the SSL backend writes decrypted data directly into the
+ // QIODevice's read buffer. As this buffer is always emptied by the caller,
+ // we need to wait for more incoming data.
+ return (state == QAbstractSocket::ConnectedState) ? Q_INT64_C(0) : Q_INT64_C(-1);
+}
+
+/*!
+ \internal
+*/
bool QSslSocketPrivate::flush()
{
#ifdef QSSLSOCKET_DEBUG