diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/websockets/qwebsocket_p.cpp | 2 | ||||
-rw-r--r-- | src/websockets/qwebsocket_wasm_p.cpp | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp index c8bee53..6965731 100644 --- a/src/websockets/qwebsocket_p.cpp +++ b/src/websockets/qwebsocket_p.cpp @@ -1451,6 +1451,7 @@ void QWebSocketPrivate::setReadBufferSize(qint64 size) m_pSocket->setReadBufferSize(m_readBufferSize); } +#ifndef Q_OS_WASM /*! \internal */ @@ -1459,5 +1460,6 @@ bool QWebSocketPrivate::isValid() const return (m_pSocket && m_pSocket->isValid() && (m_socketState == QAbstractSocket::ConnectedState)); } +#endif QT_END_NAMESPACE diff --git a/src/websockets/qwebsocket_wasm_p.cpp b/src/websockets/qwebsocket_wasm_p.cpp index 922d6a8..199fe44 100644 --- a/src/websockets/qwebsocket_wasm_p.cpp +++ b/src/websockets/qwebsocket_wasm_p.cpp @@ -187,3 +187,9 @@ void QWebSocketPrivate::open(const QNetworkRequest &request, bool mask) socketContext.set("onmessage", val::module_property("QWebSocketPrivate_onIncomingMessageCallback")); socketContext.set("data-context", val(quintptr(reinterpret_cast<void *>(this)))); } + +bool QWebSocketPrivate::isValid() const +{ + return (!socketContext.isUndefined() && + (m_socketState == QAbstractSocket::ConnectedState)); +} |