Adds latest migration results
This commit is contained in:
829 files changed
+35074
-70886
No files matched your search
@@ -1,6 +1,8 @@
|
||||
#include <QtNetwork/QTcpServer>
|
||||
#include <QtNetwork/QTcpSocket>
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
#include <QtWebSockets/QWebSocketServer>
|
||||
#endif
|
||||
#include <httq/AbstractServer.h>
|
||||
#include <httq/HttpRequest.h>
|
||||
#include <httq/Logger.h>
|
||||
@@ -43,6 +45,7 @@ void AbstractServer::slotNewConnection()
|
||||
connect(req, &HttpRequest::signalUpgrade, this, [this, req](QTcpSocket* sock) {
|
||||
mLogger->debug(QStringLiteral("signalUpgrade"));
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
QWebSocketServer* wsSvr = webSocketServer();
|
||||
|
||||
if (wsSvr == nullptr)
|
||||
@@ -54,6 +57,12 @@ void AbstractServer::slotNewConnection()
|
||||
}
|
||||
|
||||
wsSvr->handleConnection(sock);
|
||||
#else
|
||||
mLogger->debug(QStringLiteral("websocket support not available"));
|
||||
sock->close();
|
||||
sock->deleteLater();
|
||||
return;
|
||||
#endif
|
||||
emit sock->readyRead();
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user