Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved How could I connect to the server by websocket(wss) or https protocol when develop webapp by Qt

    General and Desktop
    3
    6
    502
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tham
      tham last edited by tham

      Qt for webassembly of Qt5.13.1 do not support SSL yet, they treat this issue as P2, that means we may have a long time do not have ssl support at all(another 3 months or a few years?), do you have any suggestions to perform network operations with SSL support?Any recommended libraries and examples?Thanks

      ps : It's a bit pointless to have a web app without SSL support.

      JonB 1 Reply Last reply Reply Quote 0
      • JonB
        JonB @tham last edited by JonB

        @tham
        When normally/traditionally you do this via https://doc.qt.io/qt-5/qnetworkaccessmanager.html#details, which will support SSL. Is that what you were looking for? (But that is of course is not from a web browser, but from a native app.)

        tham 1 Reply Last reply Reply Quote 0
        • tham
          tham @JonB last edited by

          @jonb said in How could I connect to the server by websocket(wss) or https protocol without Qt(wasm build):

          @tham
          When normally/traditionally you do this via https://doc.qt.io/qt-5/qnetworkaccessmanager.html#details, which will support SSL. Is that what you were looking for?

          No, because Qt for webassembly do not support ssl yet.

          JonB 1 Reply Last reply Reply Quote 0
          • JonB
            JonB @tham last edited by

            @tham
            Pardon? I know that. Like I said, QNetworkAccessManager does support SSL, but it has nothing to do with WASM.

            tham 1 Reply Last reply Reply Quote 0
            • tham
              tham @JonB last edited by

              @jonb Pardon, I mentioned want it to work for wasm from the beginning.

              1 Reply Last reply Reply Quote 0
              • lorn.potter
                lorn.potter last edited by

                I am currently working on refactoring the QNAM backend for webasembly. As well as QTcpSocket and QtWebSocket rework.

                That said, connecting to https should work. The QNAM backend currently uses XMLHttpRequest, which supports https as is without outside ssl support, as long as the serving certificate is good.

                Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
                Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post