WebAssembly and remote objects module
Solved
Qt for WebAssembly
-
Hello everyone.
I have installedQt 5.15.1
(from Qt Installer) andEmscripten 1.37
.
I try execute next codeQRemoteObjectHost host; qDebug() << host.setHostUrl(QUrl("tcp://127.0.0.1:12121"));
and get fail at console of browser:
QNativeSocketEngine::initialize unable to inline out-of-band data qtloader.js:382 qt.remoteobjects: Listen failed for URL: QUrl("tcp://127.0.0.1:12121") qtloader.js:382 qt.remoteobjects: QAbstractSocket::UnknownSocketError
Same for
QWebSocketServer
andQTcpServer
What is wrong? It's possible to use
QtRemoteObject
module withWASM
? -
WebAssembly as a platform, does not have native support for servers (same as javascript). Emscripten does support using servers via proxy, but that requires a real server.
As well, Qt WebAssembly does not yet support emscripten tcp proxy as it requires to run main() in a webworker and pass graphical data to the main thread for canvas access.