Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

https://doc.qt.io/qt-5/qml-qtwebsockets-websocket.html#errorString-prop

In this website, I did not find Sec-Websocket-Key and Sec-Websocket-Protocol and other related settings.

How can I use them in qml?

Do I need to use C++ QWebsocket ?

Thank you. I understand. As far as I know, Sec-Websocket-Protocol is in the Header , but I can modify it to the url . Javin Yang Sep 30, 2020 at 14:58 Let me correct my previous comment: 1) Qt WebSocket does not support WebSocket Subprotocols/Sec-Websocket-Protocol, docs : QWebSocket currently does not support WebSocket Extensions and WebSocket Subprotocols. , 2) by default "Sec-Websocket-Key" is randomly generated, docs: Warning: To generate masks, this implementation of WebSockets uses the reasonably secure QRandomGenerator::global()->generate() function although it can be modified. 3) With the above you could explain what you want to do. eyllanesc Sep 30, 2020 at 17:42

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .