summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qlocalsocket_p.h
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2017-09-02 20:04:38 +0300
committerAlex Trotsenko <alex1973tr@gmail.com>2017-09-05 16:58:02 +0000
commit0fcb6c26c1f4a0506bfa7dba181ed6db4e02bdb0 (patch)
treeceb01afd3d2647d9ca814de257475eb78cc25cbe /src/network/socket/qlocalsocket_p.h
parentaa95e9e98618d8838ba6d83f3cc365113ca6f410 (diff)
QLocalSocket: forward skipping to the inner socket
As QLocalSocket keeps incoming data in the inner socket object, we can implement the outer's skip() by simply calling the inner's. This avoids the slow read()-based code path provided by the base class. Change-Id: I66547601ebad1b4acf168475bebd81fbeef969f8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/network/socket/qlocalsocket_p.h')
-rw-r--r--src/network/socket/qlocalsocket_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/socket/qlocalsocket_p.h b/src/network/socket/qlocalsocket_p.h
index eb59af5577..8b72da397f 100644
--- a/src/network/socket/qlocalsocket_p.h
+++ b/src/network/socket/qlocalsocket_p.h
@@ -120,6 +120,7 @@ public:
void init();
#if defined(QT_LOCALSOCKET_TCP)
+ qint64 skip(qint64 maxSize) override;
QLocalUnixSocket* tcpSocket;
bool ownsTcpSocket;
void setSocket(QLocalUnixSocket*);
@@ -139,6 +140,7 @@ public:
QWindowsPipeReader *pipeReader;
QLocalSocket::LocalSocketError error;
#else
+ qint64 skip(qint64 maxSize) override;
QLocalUnixSocket unixSocket;
QString generateErrorString(QLocalSocket::LocalSocketError, const QString &function) const;
void errorOccurred(QLocalSocket::LocalSocketError, const QString &function);