Websockets not locally
-
I was using this examples (doc.qt.io/qt-5/qtwebsockets-simplechat-example.html) to find out how to use websockets. Everythink works fine locally, but I don't know what next.
What must be done to put this (doc.qt.io/qt-5/qtwebsockets-simplechat-chatclient-html.html) file on web server, and make it connect to my websocket server on my pc? Guess changing 'localhost' in this line:
var wsUri = "ws://localhost:1234";
to my global-ip won't solve the problem (already tried change this, open port, and run this html file on my pc, but it can't connect).I think I'm missing few steps. Maybe it's not raw QT problem, but I will be thanful for any clue.
-
Hi, have you been able to find a solution to this issue? i have been wacking my brain around this websocket thing for a few weeks now, and i just cant get it to work, i have fingured out how i can send the data using the Webchannel standalone example and how i can use it to display my sensor data on the web browser. but it doesnt meet the requirements of my project. the problem is the HTML file is basically being opened from the local storage, i want to be able to connect to the html page using a localhost:port option. and the documentation on this is to vague for a neewbi to qt to be able to understand and work with.
i would really appreciate any help