summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocket_p.h
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2013-12-22 18:24:21 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-23 19:26:09 +0100
commit23ccec8ce246634799b06f55b85478b3fbbb356d (patch)
tree7144ceb793362636931c4d26f9cc5f1561672fda /src/websockets/qwebsocket_p.h
parent19d8d19af44b9075f745790380c3fe663d8e7fd0 (diff)
downloadqtwebsockets-23ccec8ce246634799b06f55b85478b3fbbb356d.tar.gz
Add optimizations
Change-Id: Icd293f832e2d7a6272d4953c1994065d16222375 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'src/websockets/qwebsocket_p.h')
-rw-r--r--src/websockets/qwebsocket_p.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/websockets/qwebsocket_p.h b/src/websockets/qwebsocket_p.h
index e21c274..d9fc612 100644
--- a/src/websockets/qwebsocket_p.h
+++ b/src/websockets/qwebsocket_p.h
@@ -142,10 +142,10 @@ public:
QWebSocketProtocol::CloseCode closeCode() const;
QString closeReason() const;
- qint64 write(const char *message); //send data as text
- qint64 write(const char *message, qint64 maxSize); //send data as text
- qint64 write(const QString &message); //send data as text
- qint64 write(const QByteArray &data); //send data as binary
+ qint64 write(const char *message) Q_REQUIRED_RESULT;
+ qint64 write(const char *message, qint64 maxSize) Q_REQUIRED_RESULT;
+ qint64 write(const QString &message) Q_REQUIRED_RESULT;
+ qint64 write(const QByteArray &data) Q_REQUIRED_RESULT; //send data as binary
#ifndef QT_NO_SSL
void ignoreSslErrors(const QList<QSslError> &errors);
@@ -184,13 +184,13 @@ private:
void setSocketState(QAbstractSocket::SocketState state);
void setErrorString(const QString &errorString);
- qint64 doWriteFrames(const QByteArray &data, bool isBinary);
+ qint64 doWriteFrames(const QByteArray &data, bool isBinary) Q_REQUIRED_RESULT;
void makeConnections(const QTcpSocket *pTcpSocket);
void releaseConnections(const QTcpSocket *pTcpSocket);
QByteArray getFrameHeader(QWebSocketProtocol::OpCode opCode, quint64 payloadLength, quint32 maskingKey, bool lastFrame);
- QString calculateAcceptKey(const QString &key) const;
+ QString calculateAcceptKey(const QByteArray &key) const;
QString createHandShakeRequest(QString resourceName,
QString host,
QString origin,
@@ -201,13 +201,13 @@ private:
static QWebSocket *upgradeFrom(QTcpSocket *tcpSocket,
const QWebSocketHandshakeRequest &request,
const QWebSocketHandshakeResponse &response,
- QObject *parent = Q_NULLPTR);
+ QObject *parent = Q_NULLPTR) Q_REQUIRED_RESULT;
quint32 generateMaskingKey() const;
QByteArray generateKey() const;
quint32 generateRandomNumber() const;
- qint64 writeFrames(const QList<QByteArray> &frames);
- qint64 writeFrame(const QByteArray &frame);
+ qint64 writeFrames(const QList<QByteArray> &frames) Q_REQUIRED_RESULT;
+ qint64 writeFrame(const QByteArray &frame) Q_REQUIRED_RESULT;
QScopedPointer<QTcpSocket> m_pSocket;
QString m_errorString;