node.jsherokuhttpswebsocketsocket.io

socket.io-client-cpp does not connect to node app on Heroku via https


socket.io-client.cpp does not connect to node app on Heroku while Node JS socket.io-client does without any problem. Error is:

[2018-12-11 19:32:43] [connect] Successful connection 
[2018-12-11 19:32:43] [error] handle_read_http_response error: websocketpp.transport:7 (End of File) 
[2018-12-11 19:32:43] [info] Error getting remote endpoint: system:107

Changed URL from https to http://myapp.heroku.com - works now. Is it possible to connect via https as well? JS socket.io-client connects via secure connection without any problem.


Solution

  • Have built socket.io-client-cpp app with SIO_TLS in DEFINES (compiler flag: -DSIO_TLS) - connects via https fine now! This enables TLS support as mentioned here:

    https://github.com/socketio/socket.io-client-cpp/pull/137