IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QWebSocketHandshakeOptions Class

Collects options for the WebSocket handshake.

This class was introduced in Qt 6.4.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QWebSocketHandshakeOptions Class

  • Header: QWebSocketHandshakeOptions

  • Since: Qt 6.4

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS WebSockets)

    target_link_libraries(mytarget PRIVATE Qt6::WebSockets)

  • qmake: QT += websockets

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

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

See also subprotocols()

QStringList QWebSocketHandshakeOptions::subprotocols() const

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

See Also

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.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+