QHttpServerWebSocketUpgradeResponse Class

Response to return when verifying WebSocket upgrades on HTTP server. More...

Header: #include <QHttpServerWebSocketUpgradeResponse>
CMake: find_package(Qt6 REQUIRED COMPONENTS HttpServer)
target_link_libraries(mytarget PRIVATE Qt6::HttpServer)
qmake: QT += httpserver
Since: Qt 6.8

Public Functions

~QHttpServerWebSocketUpgradeResponse()
int denyMessage() &&
const int &denyMessage() const &
int denyStatus() const
int type() const
class QHttpServerWebSocketUpgradeResponse &operator=(QHttpServerWebSocketUpgradeResponse &&other)

Detailed Description

Use this class to return when determining whether a socket upgrade should succeed. If type() is Accept upgrade the socket, if type() is Deny send an error with the given denyStatus() and denyMessage(), and if type() is PassToNext proceed to the next registered handler. If all handlers return PassToNext or none exist, QAbstractHttpServer::missingHandler() is executed.

See also QAbstractHttpServer::addWebSocketUpgradeVerifier() and QAbstractHttpServer::missingHandler().

Member Function Documentation

[noexcept] QHttpServerWebSocketUpgradeResponse::~QHttpServerWebSocketUpgradeResponse()

Destroys a QHttpServerWebSocketUpgradeResponse object.

int QHttpServerWebSocketUpgradeResponse::denyMessage() &&

Returns the error message to return if type() is Deny.

const int &QHttpServerWebSocketUpgradeResponse::denyMessage() const &

Returns the error message to return if type() is Deny.

int QHttpServerWebSocketUpgradeResponse::denyStatus() const

Returns the HTTP status code to return if type() is Deny.

int QHttpServerWebSocketUpgradeResponse::type() const

Returns the type of response.

See also ResponseType.

[noexcept default] class QHttpServerWebSocketUpgradeResponse &QHttpServerWebSocketUpgradeResponse::operator=(QHttpServerWebSocketUpgradeResponse &&other)

Move-assigns the values of other to this object.