Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

WebAssembly and remote objects module



  • Hello everyone.
    I have installed Qt 5.15.1 (from Qt Installer) and Emscripten 1.37.
    I try execute next code

        QRemoteObjectHost 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 and QTcpServer

    What is wrong? It's possible to use QtRemoteObject module with WASM?



  • 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.


Log in to reply