QWebSocketProtocol Namespace
The QWebSocketProtocol namespace holds the versions and close codes of the WebSocket protocol. More…
| Header | #include <QWebSocketProtocol> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::WebSockets) |
| Module | Nt WebSockets C++ Classes |
| Since | 5.3 |
Public Types
Detailed Description
Member Type Documentation
enum QWebSocketProtocol::CloseCode
The codes of the closing handshake (RFC 6455, section 7.4.1). Codes from 3000 to 4999 are for applications and libraries: they have no enumerator, but close() sends them and QWebSocket::closeCode() returns them, cast to CloseCode.
| Constant | Description |
|---|---|
QWebSocketProtocol::CloseCodeNormal | The purpose of the connection was fulfilled. |
QWebSocketProtocol::CloseCodeGoingAway | The endpoint is going away, for example a server shutting down. |
QWebSocketProtocol::CloseCodeProtocolError | The peer broke the protocol. |
QWebSocketProtocol::CloseCodeDatatypeNotSupported | The endpoint cannot accept the kind of data received. |
QWebSocketProtocol::CloseCodeReserved1004 | Reserved. |
QWebSocketProtocol::CloseCodeMissingStatusCode | The close frame had no code. Never sent. |
QWebSocketProtocol::CloseCodeAbnormalDisconnection | The connection closed without a closing handshake. Never sent. |
QWebSocketProtocol::CloseCodeWrongDatatype | A text message was not valid UTF-8. |
QWebSocketProtocol::CloseCodePolicyViolated | The message broke a policy of the endpoint. |
QWebSocketProtocol::CloseCodeTooMuchData | A message or frame was too large. |
QWebSocketProtocol::CloseCodeMissingExtension | The server did not negotiate an extension the client needs. |
QWebSocketProtocol::CloseCodeBadOperation | The endpoint met an unexpected condition. |
QWebSocketProtocol::CloseCodeTlsHandshakeFailed | The TLS handshake failed. Never sent. |
enum QWebSocketProtocol::Version
The versions of the WebSocket protocol. Nt speaks version 13 only.
| Constant | Description |
|---|---|
QWebSocketProtocol::VersionUnknown | An unknown version. |
QWebSocketProtocol::Version0 | Draft hixie-76 (hybi-00). |
QWebSocketProtocol::Version4 | Draft hybi-04. |
QWebSocketProtocol::Version5 | Draft hybi-05. |
QWebSocketProtocol::Version6 | Draft hybi-06. |
QWebSocketProtocol::Version7 | Draft hybi-07. |
QWebSocketProtocol::Version8 | Drafts hybi-08 to hybi-12. |
QWebSocketProtocol::Version13 | RFC 6455. |
QWebSocketProtocol::VersionLatest | The latest version, Version13. |