Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

UDP server in QML/JS only



  • I'm using a commercial device that allows only QML scripts to be loaded. I have no way to write a Qt/C++ back-end application.
    Hence, I wonder if there's a way to create an UDP server in QML/JavaScript only.


  • Qt Champions 2017

    Looks like this is not possible. WebSocket is one option but it uses the TCP. You better ask the your provider add UDP related classes in the package and expose them to QML side.



  • I can live with TCP as well. But As far as I know WebSocket are available only since Qt5.3 while I'm stuck with Qt4.7.1 and QtQuick 1.1. The manufacturer doesn't offer any support about customizing this product. I would like to setup a cross-compiler toolchain and rebuild Qt5 but I have no time to do that.


  • Qt Champions 2017

    You don't have to customise the product. Can you write QML Application or not ? Does your project has main.cpp or not ? Will you be able to add the C++ class to your project or not ? Please confirm this.



  • @dheerendra I wrote this information in the question.

    There's no main.cpp, and no way to build a C++ application, there are no compilers. I can only place QML files in a specific folder and a closed source application will load them on startup.


  • Qt Champions 2017

    hmmm. Then you must customise. You have no other choice.


Log in to reply