I am trying to connect to the Echo Test Websocket using the Poco C++ libraries. In order to do so here is my code which should set up the Websocket:
HTTPClie
The 'Not Found' error is the standard HTTP 404 Not Found returned by the HTTP server. It generally means the resource you are requesting does not exist.
I got your code to work by changing the resource from "/ws"
to "/"
:
HTTPRequest request(HTTPRequest::HTTP_GET, "/");
and adding the following line
request.set("origin", "http://www.websocket.org");
before creating the new WebSocket
. I think it's a header pair that many (or all?) WebSocket servers expect.