Important: Please read the Qt Code of Conduct -

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://"));

    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://")
    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