summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/websockets/qwebsocket.cpp')
-rw-r--r--src/websockets/qwebsocket.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/websockets/qwebsocket.cpp b/src/websockets/qwebsocket.cpp
index 1b0fc35..64d5e4c 100644
--- a/src/websockets/qwebsocket.cpp
+++ b/src/websockets/qwebsocket.cpp
@@ -772,4 +772,17 @@ bool QWebSocket::isValid() const
return d->isValid();
}
+/*!
+ \since 5.12
+ Returns the number of bytes that are waiting to be written. The bytes are written when control
+ goes back to the event loop or when flush() is called.
+
+ \sa flush
+ */
+qint64 QWebSocket::bytesToWrite() const
+{
+ Q_D(const QWebSocket);
+ return d->m_pSocket ? d->m_pSocket->bytesToWrite() : 0;
+}
+
QT_END_NAMESPACE