Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Is it possible to to create a server with several endpoints by QWebSocketServer?
tham last edited by tham
Could I use QWebSocketServer to "register" different endpoints like
I have wrote a simple application by QWevSocketServer, but have no idea how could I add more endpoints to it. If there is no way or hard to be done by QWebSocketServer, I will add a "mode" field in my json file in order to process different tasks. Thank you very much.
@tham Sure. But not like you would think. Basically once you accept the connection to the websocket, you can then get the URL with something like
sock->requestUrl()and then act accordingly based on the URL you received.