summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocket.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/websockets/qwebsocket.h')
-rw-r--r--src/websockets/qwebsocket.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/websockets/qwebsocket.h b/src/websockets/qwebsocket.h
index 927350a..dbb13cf 100644
--- a/src/websockets/qwebsocket.h
+++ b/src/websockets/qwebsocket.h
@@ -104,10 +104,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;
#ifndef QT_NO_SSL
void ignoreSslErrors(const QList<QSslError> &errors);
@@ -116,7 +116,8 @@ public:
#endif
public Q_SLOTS:
- void close(QWebSocketProtocol::CloseCode closeCode = QWebSocketProtocol::CC_NORMAL, const QString &reason = QString());
+ void close(QWebSocketProtocol::CloseCode closeCode = QWebSocketProtocol::CC_NORMAL,
+ const QString &reason = QString());
void open(const QUrl &url, bool mask = true);
void ping(const QByteArray &payload = QByteArray());
#ifndef QT_NO_SSL
@@ -145,7 +146,8 @@ Q_SIGNALS:
#endif
private:
- QWebSocket(QTcpSocket *pTcpSocket, QWebSocketProtocol::Version version, QObject *parent = Q_NULLPTR);
+ QWebSocket(QTcpSocket *pTcpSocket, QWebSocketProtocol::Version version,
+ QObject *parent = Q_NULLPTR);
QWebSocketPrivate * const d_ptr;
};