QWebSocketProtocol

Contains constants related to the WebSocket standard. More

Inheritance diagram of PySide6.QtWebSockets.QWebSocketProtocol

Detailed Description

PySide6.QtWebSockets.QWebSocketProtocol.Version

The different defined versions of the WebSocket protocol.

For an overview of the differences between the different protocols, see pywebsocket’s WebSocketProtocolSpec .

Constant

Description

QWebSocketProtocol.VersionUnknown

Unknown or unspecified version.

QWebSocketProtocol.Version0

hixie76 and hybi-00 . Works with key1, key2 and a key in the payload. Attribute: Sec-WebSocket-Draft value 0. Not supported by QtWebSockets .

QWebSocketProtocol.Version4

hybi-04 . Changed handshake: key1, key2, key3 ==> Sec-WebSocket-Key, Sec-WebSocket-Nonce, Sec-WebSocket-Accept Sec-WebSocket-Draft renamed to Sec-WebSocket-Version Sec-WebSocket-Version = 4. Not supported by QtWebSockets .

QWebSocketProtocol.Version5

hybi-05 . Sec-WebSocket-Version = 5 Removed Sec-WebSocket-Nonce Added Sec-WebSocket-Accept. Not supported by QtWebSockets .

QWebSocketProtocol.Version6

Sec-WebSocket-Version = 6. Not supported by QtWebSockets .

QWebSocketProtocol.Version7

hybi-07 . Sec-WebSocket-Version = 7. Not supported by QtWebSockets .

QWebSocketProtocol.Version8

hybi-8, hybi-9, hybi-10, hybi-11 and hybi-12. Status codes 1005 and 1006 are added and all codes are now unsigned Internal error results in 1006. Not supported by QtWebSockets .

QWebSocketProtocol.Version13

hybi-13, hybi14, hybi-15, hybi-16, hybi-17 and RFC 6455 . Sec-WebSocket-Version = 13 Status code 1004 is now reserved Added 1008, 1009 and 1010 Must support TLS Clarify multiple version support. Supported by QtWebSockets .

QWebSocketProtocol.VersionLatest

Refers to the latest known version to QtWebSockets .

PySide6.QtWebSockets.QWebSocketProtocol.CloseCode

The close codes supported by WebSockets V13

Constant

Description

QWebSocketProtocol.CloseCodeNormal

Normal closure

QWebSocketProtocol.CloseCodeGoingAway

Going away

QWebSocketProtocol.CloseCodeProtocolError

Protocol error

QWebSocketProtocol.CloseCodeDatatypeNotSupported

Unsupported data

QWebSocketProtocol.CloseCodeReserved1004

Reserved

QWebSocketProtocol.CloseCodeMissingStatusCode

No status received

QWebSocketProtocol.CloseCodeAbnormalDisconnection

Abnormal closure

QWebSocketProtocol.CloseCodeWrongDatatype

Invalid frame payload data

QWebSocketProtocol.CloseCodePolicyViolated

Policy violation

QWebSocketProtocol.CloseCodeTooMuchData

Message too big

QWebSocketProtocol.CloseCodeMissingExtension

Mandatory extension missing

QWebSocketProtocol.CloseCodeBadOperation

Internal server error

QWebSocketProtocol.CloseCodeTlsHandshakeFailed

TLS handshake failed

See also

close()