QWebSocketHandshakeOptions Class
Sammelt Optionen für den WebSocket-Handshake. Mehr...
| Header: | #include <QWebSocketHandshakeOptions> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS WebSockets) target_link_libraries(mytarget PRIVATE Qt6::WebSockets) |
| qmake: | QT += websockets |
| Seit: | Qt 6.4 |
Öffentliche Funktionen
| 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) |
Verwandte Nicht-Mitglieder
| bool | operator!=(const QWebSocketHandshakeOptions &lhs, const QWebSocketHandshakeOptions &rhs) |
| bool | operator==(const QWebSocketHandshakeOptions &lhs, const QWebSocketHandshakeOptions &rhs) |
Ausführliche Beschreibung
QWebSocketHandshakeOptions sammelt Optionen, die an den WebSocket-Handshake übergeben werden, wie beispielsweise WebSocket-Subprotokolle und WebSocket-Erweiterungen.
Derzeit werden nur WebSocket-Subprotokolle unterstützt.
Siehe auch ` QWebSocket::open()`.
Dokumentation der Mitgliedsfunktionen
QWebSocketHandshakeOptions::QWebSocketHandshakeOptions()
Erstellt ein leeres QWebSocketHandshakeOptions-Objekt.
QWebSocketHandshakeOptions::QWebSocketHandshakeOptions(const QWebSocketHandshakeOptions &other)
Erstellt ein `QWebSocketHandshakeOptions`-Objekt, das eine Kopie von ` other` ist.
[constexpr noexcept default] QWebSocketHandshakeOptions::QWebSocketHandshakeOptions(QWebSocketHandshakeOptions &&other)
Erstellt ein `QWebSocketHandshakeOptions`-Objekt, das aus ` other` übernommen wird.
[noexcept] QWebSocketHandshakeOptions::~QWebSocketHandshakeOptions()
Zerstört dieses Objekt.
void QWebSocketHandshakeOptions::setSubprotocols(const QStringList &protocols)
Legt die Liste der WebSocket-Subprotokolle „ protocols “ fest, die zusammen mit dem WebSocket-Handshake gesendet werden sollen.
Die Namen von WebSocket-Subprotokollen dürfen nur aus US-ASCII-Zeichen bestehen, die zur nicht reservierten Gruppe gehören. Ungültige Protokollnamen werden nicht in den Handshake aufgenommen.
Siehe auch subprotocols().
QStringList QWebSocketHandshakeOptions::subprotocols() const
Gibt die Liste der WebSocket-Subprotokolle zurück, die zusammen mit dem WebSocket-Handshake gesendet werden sollen.
Siehe auch ` setSubprotocols()`.
[noexcept] QWebSocketHandshakeOptions &QWebSocketHandshakeOptions::operator=(QWebSocketHandshakeOptions &&other)
Verschiebt „ other “ in dieses Objekt.
QWebSocketHandshakeOptions &QWebSocketHandshakeOptions::operator=(const QWebSocketHandshakeOptions &other)
Weist diesem Objekt „ other “ zu.
Zugehörige Nicht-Mitglieder
bool operator!=(const QWebSocketHandshakeOptions &lhs, const QWebSocketHandshakeOptions &rhs)
bool operator==(const QWebSocketHandshakeOptions &lhs, const QWebSocketHandshakeOptions &rhs)
Prüft, ob „ lhs “ mit „ rhs “ übereinstimmt.
© 2026 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.