class QWebSocketHandshakeOptions#

Collects options for the WebSocket handshake. More

New in version 6.4.

Synopsis#

Methods#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

QWebSocketHandshakeOptions collects options that are passed along to the WebSocket handshake, such as WebSocket subprotocols and WebSocket Extensions.

At the moment, only WebSocket subprotocols are supported.

See also

open()

__init__()#

Constructs an empty QWebSocketHandshakeOptions object.

__init__(other)
Parameters:

otherQWebSocketHandshakeOptions

Constructs a QWebSocketHandshakeOptions that is a copy of other.

__ne__(rhs)#
Parameters:

rhsQWebSocketHandshakeOptions

Return type:

bool

__eq__(rhs)#
Parameters:

rhsQWebSocketHandshakeOptions

Return type:

bool

setSubprotocols(protocols)#
Parameters:

protocols – list of strings

Sets the list of WebSocket subprotocols protocols to send along with the websocket handshake.

WebSocket subprotocol names may only consist of those US-ASCII characters that are in the unreserved group. Invalid protocol names will not be included in the handshake.

See also

subprotocols()

subprotocols()#
Return type:

list of strings

Returns the list of WebSocket subprotocols to send along with the websocket handshake.

swap(other)#
Parameters:

otherQWebSocketHandshakeOptions