socketio / socket.io-client-cpp

C++11 implementation of Socket.IO client
MIT License
2.26k stars 730 forks source link

installed library using vcpkg is support tls? help me. #398

Closed JoonikChoi closed 1 year ago

JoonikChoi commented 1 year ago

First of all, I am not good at c++ and msvc. Considering this, please explain to me.

I installed this library via vcpkg (i'm windows 11). it's connect to my node-js 'http' server successfully. but, when i create 'https' node-js server and try to connect this, it's not works.

The error message is as follows. [2023-06-13 16:16:07] [connect] Successful connection [2023-06-13 16:16:07] [error] handle_read_http_response error: websocketpp.transport:7 (End of File)

When I looked around the issues tab, they told to define sio_tls, so i set sio_tls in msvc preprosessing setting tab. preprosessing setting value is the following .

----------- %(PreprocessorDefinitions) WIN32 _WINDOWS NDEBUG CMAKE_INTDIR="Release" SIO_TLS WEBSOCKETPP_CPP11_STL WEBSOCKETPP_CPP11_FUNCTIONAL -----------

However, I still cannot connect to the my 'https' node-js server. I went through a lot of tests and found out that sio definitely knew there was a server, but it ended up not connecting.

I wish someone can give me an answer.

JoonikChoi commented 1 year ago

I solved this problem. i don't know exact cause, but I guessed that there was a problem that mvsc can't binding lib of vcpkg. I open a the vcpkg installed lib folder and deleted 'sioclient.lib'. and then renamed 'sioclient_tls.lib' into 'sioclient.lib'. it works!