QWebSocketHandshakeOptions Class
Collects options for the WebSocket handshake. More...
Header: | #include <QWebSocketHandshakeOptions> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WebSockets) target_link_libraries(mytarget PRIVATE Qt6::WebSockets) |
qmake: | QT += websockets |
Since: | Qt 6.4 |
Public Functions
QWebSocketHandshakeOptions() | |
QWebSocketHandshakeOptions(const QWebSocketHandshakeOptions &other) | |
QWebSocketHandshakeOptions(QWebSocketHandshakeOptions &&other) | |
~QWebSocketHandshakeOptions() | |
void | setSubprotocols(const QStringList &protocols) |
QStringList | subprotocols() const |
QWebSocketHandshakeOptions & | operator=(QWebSocketHandshakeOptions &&other) |
QWebSocketHandshakeOptions & | operator=(const QWebSocketHandshakeOptions &other) |
Related Non-Members
bool | operator!=(const QWebSocketHandshakeOptions &lhs, const QWebSocketHandshakeOptions &rhs) |
bool | operator==(const QWebSocketHandshakeOptions &lhs, const QWebSocketHandshakeOptions &rhs) |
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 QWebSocket::open().
Member Function Documentation
QWebSocketHandshakeOptions::QWebSocketHandshakeOptions()
Constructs an empty QWebSocketHandshakeOptions object.
QWebSocketHandshakeOptions::QWebSocketHandshakeOptions(const QWebSocketHandshakeOptions &other)
Constructs a QWebSocketHandshakeOptions that is a copy of other.
QWebSocketHandshakeOptions::QWebSocketHandshakeOptions(QWebSocketHandshakeOptions &&other)
Constructs a QWebSocketHandshakeOptions that is moved from other.
QWebSocketHandshakeOptions::~QWebSocketHandshakeOptions()
Destroys this object.
void QWebSocketHandshakeOptions::setSubprotocols(const QStringList &protocols)
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().
QStringList QWebSocketHandshakeOptions::subprotocols() const
Returns the list of WebSocket subprotocols to send along with the websocket handshake.
See also setSubprotocols().
QWebSocketHandshakeOptions &QWebSocketHandshakeOptions::operator=(QWebSocketHandshakeOptions &&other)
Moves other to this object.
QWebSocketHandshakeOptions &QWebSocketHandshakeOptions::operator=(const QWebSocketHandshakeOptions &other)
Assigns other to this object.
Related Non-Members
bool operator!=(const QWebSocketHandshakeOptions &lhs, const QWebSocketHandshakeOptions &rhs)
bool operator==(const QWebSocketHandshakeOptions &lhs, const QWebSocketHandshakeOptions &rhs)
Compares lhs for equality with rhs.
© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.