How to upgrade existing HTTP socket created by QNAM to Websocket
I doing a HTTP request via QNetworkAccessManager. I set a 'Keep-Alive' option, and hope a socket will not be closed. Next I create QWebSocket to the same address and port.
Problem is the QWebSocket uses a new source port, but I want to reuse old one, the port from the QNAM.
How I can reuse the old source port in QWebSocket?
@aha_1980 Thank you!
I thanked too early :)
First of all -- this is websocketserver, but I trying to make a websocket client, like a browser.
Second thing -- we don't have an access to the socket in QNAM and cannot create a custom socket for connection like in early versions of Qt. QHTTP and theirs method setSocket are marked as deprecated.
So, the problem still the actual