summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocket_p.h
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-01-17 18:20:40 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-18 00:20:27 +0100
commitaa66bb128b4d853c6de200bf374758025dcd94b2 (patch)
tree97489863843aacc053c88c117b9203a6c30f5058 /src/websockets/qwebsocket_p.h
parent6c12e81e58b5e38c4d075cc6d7adaaaf01d80879 (diff)
downloadqtwebsockets-aa66bb128b4d853c6de200bf374758025dcd94b2.tar.gz
Add a few more const refs
In case of processPing we need to make a copy that potentially detaches when masking is requested, but pings are < 125 bytes. Before this code would copy the byte array in the same way much earlier. Change-Id: If0592bb4b508eeb11fdbf05c4bb98b9679ed0549 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'src/websockets/qwebsocket_p.h')
-rw-r--r--src/websockets/qwebsocket_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/websockets/qwebsocket_p.h b/src/websockets/qwebsocket_p.h
index 2786727..8f5d054 100644
--- a/src/websockets/qwebsocket_p.h
+++ b/src/websockets/qwebsocket_p.h
@@ -154,7 +154,7 @@ public:
public Q_SLOTS:
void close(QWebSocketProtocol::CloseCode closeCode, QString reason);
void open(const QUrl &url, bool mask);
- void ping(QByteArray payload);
+ void ping(const QByteArray &payload);
#ifndef QT_NO_SSL
void ignoreSslErrors();
@@ -162,8 +162,8 @@ public Q_SLOTS:
private Q_SLOTS:
void processData();
- void processPing(QByteArray data);
- void processPong(QByteArray data);
+ void processPing(const QByteArray &data);
+ void processPong(const QByteArray &data);
void processClose(QWebSocketProtocol::CloseCode closeCode, QString closeReason);
void processHandshake(QTcpSocket *pSocket);
void processStateChanged(QAbstractSocket::SocketState socketState);