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

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

    XMLWordPrintable

Details

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

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes