App in C++ using POCO Websocket : issue in the binary adress, help ? :)
Hi !
I'm using POCO libraries in C++ to communicate with : wss://ws.binaryws.com/websockets/v3?app_id=1234. (1234 is fake, i use my own id)
But when I code :
Poco::Net::HTTPSClientSession Client("ws.binaryws.com/websockets/v3?app_id=1234", 443, &context);
the
int rc = getaddrinfo(hostname.c_str(), NULL, &hints, &pAI);
return an error.
I used :
Poco::Net::HTTPSClientSession Client("ws.binaryws.com/websockets/v3", 443, &context);
Poco::Net::HTTPSClientSession Client("www.binaryws.com/websockets/v3", 443, &context);
Poco::Net::HTTPSClientSession Client("wss://ws.binaryws.com/websockets/v3", 443, &context);
But with the same issue : HostNotFoundException
Any ideas please ?
Comments
You need to use websocket library, as of now you are connecting with https one. Give a look at https://pocoproject.org/docs/Poco.Net.WebSocket.html
Finally, I did it in C#, much easier !
Thanks anyway