QWebSocketDataProcessor Class
Header: | #include <QWebSocketDataProcessor> |
Inherits: | QObject |
Public Functions
QWebSocketDataProcessor(QObject *parent = nullptr) | |
virtual | ~QWebSocketDataProcessor() override |
quint64 | maxAllowedMessageSize() const |
void | setMaxAllowedMessageSize(quint64 maxAllowedMessageSize) |
Public Slots
Static Public Members
quint64 | maxFrameSize() |
quint64 | maxMessageSize() |
Detailed Description
The class QWebSocketDataProcessor is responsible for reading, validating and interpreting data from a WebSocket. It reads data from a QIODevice, validates it against RFC 6455, and parses it into frames (data, control). It emits signals that correspond to the type of the frame: textFrameReceived(), binaryFrameReceived(), textMessageReceived(), binaryMessageReceived(), pingReceived(), pongReceived() and closeReceived(). Whenever an error is detected, the errorEncountered() signal is emitted. QWebSocketDataProcessor also checks if a frame is allowed in a sequence of frames (e.g. a continuation frame cannot follow a final frame). This class is an internal class used by QWebSocketInternal for data processing and validation.
\internal
See also Frame().
Member Function Documentation
[explicit]
QWebSocketDataProcessor::QWebSocketDataProcessor(QObject *parent = nullptr)
\internal
[override virtual noexcept]
QWebSocketDataProcessor::~QWebSocketDataProcessor()
\internal
[slot]
void QWebSocketDataProcessor::clear()
\internal
quint64 QWebSocketDataProcessor::maxAllowedMessageSize() const
\internal
See also setMaxAllowedMessageSize().
[static]
quint64 QWebSocketDataProcessor::maxFrameSize()
\internal
[static]
quint64 QWebSocketDataProcessor::maxMessageSize()
\internal
[slot]
bool QWebSocketDataProcessor::process(QIODevice *pIoDevice)
\internal
Returns true
if a complete websocket frame has been processed; otherwise returns false
.
void QWebSocketDataProcessor::setMaxAllowedMessageSize(quint64 maxAllowedMessageSize)
\internal
See also maxAllowedMessageSize().