Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.6.0
-
None
-
Linux
Description
Hi;
No problems with routes, but closes connection when it is a WebSocket.
I created a QHttpServer and tryed to connect a WebSocket client but keep receiving this message:
===>>> "qt.httpserver.stream: WebSocket received but no slots connected to QWebSocketServer::newConnection or request not handled"
But I am connecting the proper signal to my slot accordind to reference.
Folow the command:
connect(m_pHttpSocketServer, &QHttpServer::newWebSocketConnection, this, &HttpSocketListener::incomingConnection);
void HttpSocketListener::incomingConnection()
{ // retrieve WebSocket pointer WebSocket * ws = m_pHttpSocketServer->nextPendingWebSocketConnection().get(); }m_pHttpSocketServer : instance of QHttpServer
QHttpServer::newWebSocketConnection : signal emited on new incoming connection
HttpSocketListener::incomingConnection : my slot
Attachments
Issue Links
- relates to
-
QTBUG-121462 Websocket support is easy to misuse
- Closed