QWebSocketHandshakeOptions Class

Collects options for the WebSocket handshake. 更多...

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

公共函数

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 )

详细描述

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.

另请参阅 QWebSocket::open ().

成员函数文档编制

QWebSocketHandshakeOptions:: QWebSocketHandshakeOptions ()

Constructs an empty QWebSocketHandshakeOptions object.

QWebSocketHandshakeOptions:: QWebSocketHandshakeOptions (const QWebSocketHandshakeOptions & other )

Constructs a QWebSocketHandshakeOptions that is a copy of other .

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

Constructs a QWebSocketHandshakeOptions that is moved from other .

[noexcept] QWebSocketHandshakeOptions:: ~QWebSocketHandshakeOptions ()

销毁此对象。

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.

另请参阅 subprotocols ().

QStringList QWebSocketHandshakeOptions:: subprotocols () const

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

另请参阅 setSubprotocols ().

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

移动 other 到此对象。

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

赋值 other 到此对象。

相关非成员

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

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

比较 lhs for equality with rhs .