I've written a small web server using QTcpServer, etc... It works fine so I wanted to get a bit further and implement Qt's WebSocket functionality. I want the WebSocket-Server to be reachable on the same port as my web server (due to limitations at my clients network).
My WebSocket-Server should be accessible at /admin/socket
so I need a way to 'upgrade' a QTcpSocket (accessible from the request handler for /admin/socket
) to a QWebSocket. QWebSocket has this functionality in this constructor which is used by this upgrade method in QWebSocketServerPrivate but it is all private and only used internally by the QWebSocketServer.
Is there a way to achieve what I described above? Do I have to implement my own WebSocket handler?