qDebug() << "Websocket connected";
connect(&m_webSocket, &QWebSocket::textMessageReceived,
this, &EchoClient::onTextMessageReceived);
- qint64 bytesWritten = m_webSocket.sendTextMessage(QStringLiteral("Hello, world!"));
- Q_UNUSED(bytesWritten);
+ m_webSocket.sendTextMessage(QStringLiteral("Hello, world!"));
}
//! [onConnected]
qDebug() << "Websocket connected";
connect(&m_webSocket, &QWebSocket::textMessageReceived,
this, &SslEchoClient::onTextMessageReceived);
- qint64 bytesWritten = m_webSocket.sendTextMessage(QStringLiteral("Hello, world!"));
- Q_UNUSED(bytesWritten);
+ m_webSocket.sendTextMessage(QStringLiteral("Hello, world!"));
}
//! [onConnected]
QWebSocketProtocol::CloseCode closeCode() const;
QString closeReason() const;
- qint64 sendTextMessage(const QString &message) Q_REQUIRED_RESULT;
- qint64 sendBinaryMessage(const QByteArray &data) Q_REQUIRED_RESULT;
+ qint64 sendTextMessage(const QString &message);
+ qint64 sendBinaryMessage(const QByteArray &data);
#ifndef QT_NO_SSL
void ignoreSslErrors(const QList<QSslError> &errors);
QWebSocketProtocol::CloseCode closeCode() const;
QString closeReason() const;
- qint64 sendTextMessage(const QString &message) Q_REQUIRED_RESULT;
- qint64 sendBinaryMessage(const QByteArray &data) Q_REQUIRED_RESULT;
+ qint64 sendTextMessage(const QString &message);
+ qint64 sendBinaryMessage(const QByteArray &data);
#ifndef QT_NO_SSL
void ignoreSslErrors(const QList<QSslError> &errors);