Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QWebSocketServer newConnection works in console but not as service?
Qt 6.11 is out! See what's new in the release blog

QWebSocketServer newConnection works in console but not as service?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 679 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pmh4514
    wrote on last edited by pmh4514
    #1

    Hello,

    I'm using Qt 5.1 on 64bit Windows. I have a basic web-sockets client-server app which when running in a command prompt everything works well. my call to QWebSocketServer::Listen(QHostAddress::Any, 9987) succeeds, and I connect the signal to a slot:

       connect(m_pWebSocketServer, &QWebSocketServer::newConnection,
                this, &MyWebsocketServer::onNewConnection);
    

    Then when the client side connects, the onNewConnection executes on the server and everything works as I'd expect.

    However, when I run the same code on the server as a windows service (running as LocalSystem), onNewConnection never hits. Logging shows that Listen() succeeds. But the incoming connection request seems to be ignored.

    I've completely disabled all firewalls and this problem persists. Not sure where to look.
    (this may not even be a Qt question?)

    Any thoughts/insights as to what I might be doing wrong?

    Thanks

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pmh4514
      wrote on last edited by
      #2

      The issue was related to OpenSSL DLLs.
      Using Qt5.15 and OpenSSL v1.1 (which has a new naming convention for the DLLs) everything started working properly.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved