-
Qt QWebSockets with kdb+
Hello there,
I am trying to connect to kdb process from C++ (using the Qt framework) using the very simple example provided by Qt for their QWebSocket class here: https://doc.qt.io/qt-6/echoclient.html
Unfortunately this doesn’t work for me. The state moves instantly from ‘ConnectingState’ to ‘UnconnectedState’ with a close code of 1000. The kdb server, meanwhile, doesn’t seem to register the connection at all (i.e. .z.wo isn’t triggered).
As a sanity check, I ran a kdb process on the same host as the C++ process and was able to open the WebSocket fine with the usual command:
r:(`$”:ws://host:port”)”GET / HTTP/1.1rnHost: host:portrnrn”
Is it known if kdb WebSockets should work with a class such as Qt’s QWebSockets? If not, is there anything in the kdb+ C API for usage with WebSockets?
Update: It seems the issue is because the kdb servier is password protected with -U/-u. This doesn’t seem to pose an issue for kdb or JavaScript clients but the WebSocket connection from C++ client simply won’t work as long as the server is password protected. Unfortunately, the server must be password protected so I’m unsure how we can work around this.
Thank you
Log in to reply.