Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-121562

QHttpServer does not emit newWebSocketConnection() to my myclass::myslot()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • None
    • 6.6.0
    • Qt Http Server
    • None
    • Linux
    • All

      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

       

        1. QtHttpServerTest.zip
          7 kB
          Sérgio Andrade
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            mikhailsvetkin Mikhail Svetkin
            sergio.andrade Sérgio Andrade
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes