QWebSocketFrame Class
Header: | #include <QWebSocketFrame> |
Public Functions
void | clear() |
QWebSocketProtocol::CloseCode | closeCode() const |
QString | closeReason() const |
bool | hasMask() const |
bool | isContinuationFrame() const |
bool | isControlFrame() const |
bool | isDataFrame() const |
bool | isDone() const |
bool | isFinalFrame() const |
bool | isValid() const |
quint32 | mask() const |
quint64 | maxAllowedFrameSize() const |
QWebSocketProtocol::OpCode | opCode() const |
QByteArray | payload() const |
void | readFrame(QIODevice *pIoDevice) |
void | setMaxAllowedFrameSize(quint64 maxAllowedFrameSize) |
Static Public Members
quint64 | maxFrameSize() |
Detailed Description
The class QWebSocketFrame is responsible for reading, validating and interpreting frames from a WebSocket. It reads data from a QIODevice, validates it against RFC 6455, and parses it into a frame (data, control). Whenever an error is detected, isValid() returns false.
Note: The QWebSocketFrame class does not look at valid sequences of frames. It processes frames one at a time.
Note: It is the QWebSocketDataProcessor that takes the sequence into account.
\internal
See also QWebSocketDataProcessor.
Member Function Documentation
void QWebSocketFrame::clear()
Resets all member variables, and invalidates the object.
\internal
QWebSocketProtocol::CloseCode QWebSocketFrame::closeCode() const
\internal
QString QWebSocketFrame::closeReason() const
\internal
bool QWebSocketFrame::hasMask() const
\internal
bool QWebSocketFrame::isContinuationFrame() const
\internal
bool QWebSocketFrame::isControlFrame() const
\internal
bool QWebSocketFrame::isDataFrame() const
\internal
bool QWebSocketFrame::isDone() const
\internal
bool QWebSocketFrame::isFinalFrame() const
\internal
bool QWebSocketFrame::isValid() const
\internal
quint32 QWebSocketFrame::mask() const
\internal
quint64 QWebSocketFrame::maxAllowedFrameSize() const
\internal
See also setMaxAllowedFrameSize().
[static]
quint64 QWebSocketFrame::maxFrameSize()
\internal
QWebSocketProtocol::OpCode QWebSocketFrame::opCode() const
\internal
QByteArray QWebSocketFrame::payload() const
\internal
void QWebSocketFrame::readFrame(QIODevice *pIoDevice)
\internal
void QWebSocketFrame::setMaxAllowedFrameSize(quint64 maxAllowedFrameSize)
\internal
See also maxAllowedFrameSize().