How do I determine which web protocol to use?
Wednesday, 18 March 2026 · 1 message
BE
Ben Engbers18 Mar 2026 00:21 #
Hi,
I’ve been working on implementing the WebSocket protocol in my C++ client for just over a month now. I started with the assumption that the basexserver uses the WebSocket protocol by default.
I can now finally send and receive WebSocket frames. But even when performing the opening handshake, I see that after sending a request, I don’t receive a WebSocket frame in return. Instead, I get the standard realm/nonce that I’m already using in my current client which is based on a raw web connection.
The developers section of the Basex documentation discusses the WebSocket protocol. In web.xml, I see that the WebSocket service is enabled. Yet I’m not getting the expected response.
My question is: where is my mistake? What do I need to do to use the WebSocket protocol as a client?
While modifying the code, I did make a few improvements. I also updated the documentation. I’ll upload my code one of these days.
Ben
By the way, I’ve learned a lot about C++ programming ;-)
Written for BaseX 12.2. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery