En esta página

QWebSocketHandshakeOptions Class

Recopila las opciones para el protocolo de establecimiento de conexión de WebSocket. Más información...

Encabezado: #include <QWebSocketHandshakeOptions>
CMake: find_package(Qt6 REQUIRED COMPONENTS WebSockets)
target_link_libraries(mytarget PRIVATE Qt6::WebSockets)
qmake: QT += websockets
Desde: Qt 6.4

Funciones públicas

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)
bool operator!=(const QWebSocketHandshakeOptions &lhs, const QWebSocketHandshakeOptions &rhs)
bool operator==(const QWebSocketHandshakeOptions &lhs, const QWebSocketHandshakeOptions &rhs)

Descripción detallada

QWebSocketHandshakeOptions recopila las opciones que se pasan al protocolo de establecimiento de conexión de WebSocket, como los subprotocolos de WebSocket y las extensiones de WebSocket.

Por el momento, solo se admiten los subprotocolos de WebSocket.

Véase también ` QWebSocket::open()`.

Documentación de funciones de miembro

QWebSocketHandshakeOptions::QWebSocketHandshakeOptions()

Crea un objeto QWebSocketHandshakeOptions vacío.

QWebSocketHandshakeOptions::QWebSocketHandshakeOptions(const QWebSocketHandshakeOptions &other)

Crea un objeto `QWebSocketHandshakeOptions` que es una copia de ` other`.

[constexpr noexcept default] QWebSocketHandshakeOptions::QWebSocketHandshakeOptions(QWebSocketHandshakeOptions &&other)

Crea un objeto `QWebSocketHandshakeOptions` que se obtiene de ` other`.

[noexcept] QWebSocketHandshakeOptions::~QWebSocketHandshakeOptions()

Destruye este objeto.

void QWebSocketHandshakeOptions::setSubprotocols(const QStringList &protocols)

Establece la lista de subprotocolos de WebSocket protocols que se enviarán junto con el protocolo de establecimiento de conexión de WebSocket.

Los nombres de los subprotocolos de WebSocket solo pueden estar formados por caracteres US-ASCII que pertenezcan al grupo no reservado. Los nombres de protocolo no válidos no se incluirán en el protocolo de enlace.

Véase también subprotocols().

QStringList QWebSocketHandshakeOptions::subprotocols() const

Devuelve la lista de subprotocolos WebSocket que se enviarán junto con el protocolo de establecimiento de conexión de WebSocket.

Véase también ` setSubprotocols()`.

[noexcept] QWebSocketHandshakeOptions &QWebSocketHandshakeOptions::operator=(QWebSocketHandshakeOptions &&other)

Traslada « other » a este objeto.

QWebSocketHandshakeOptions &QWebSocketHandshakeOptions::operator=(const QWebSocketHandshakeOptions &other)

Asigna « other » a este objeto.

Elementos no miembros relacionados

bool operator!=(const QWebSocketHandshakeOptions &lhs, const QWebSocketHandshakeOptions &rhs)

bool operator==(const QWebSocketHandshakeOptions &lhs, const QWebSocketHandshakeOptions &rhs)

Comprueba si lhs es igual a rhs.

© 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.