[Interest] QWebSocketServer via https
Alexander CarĂ´t
alexander_carot at gmx.net
Fri Jul 17 09:48:52 CEST 2020
Hello all,
I have been running a QWebSocketServer for a couple of years already and decided to switch from non-secure to secure mode now.
My implementation is based on the Qt example Echoserver.cpp and what I did is this:
1.) Replaced the call
m_pWebSocketServer(new QWebSocketServer(QStringLiteral("Echo Server"),
QWebSocketServer::NonSecureMode, this)),
with
m_pWebSocketServer(new QWebSocketServer(QStringLiteral("Echo Server"),
QWebSocketServer::SecureMode, this)),
2.) In my javascript based Webfile I replaced
websocket = new WebSocket(ws://webSocketDomain:port);
with
websocket = new WebSocket(wss://webSocketDomain:port);
After the change the browser tells me:
Can't establish connection to wss://webSocketDomain:port
That being said I assume that further actions are required - can anyone advise ?
Thanks a lot in advance,
best
Alex
--
http://www.carot.de
Email : Alexander at Carot.de
Tel.: +49 (0)177 5719797
More information about the Interest
mailing list