socketio / socket.io-client-cpp

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

In TLS build of library, support both TLS and non-TLS connections. #389

Closed leytou closed 1 year ago

leytou commented 1 year ago

The choice is made at runtime, if a TLS URI (https:// or wss://) is given, the TLS client will be used, otherwise the non-TLS client will be used.

Additionally, a new constructor is introduced allowing the URI to be passed at construction, which allows the above selection to occur, otherwise only the default for the library (TLS or non-TLS) will be used (preserving the original behavior).

jmigual commented 1 year ago

Amazing work! I'm impressed.

Apparently the build is failing because you are using a c++14 feature (overload 7 in https://en.cppreference.com/w/cpp/algorithm/equal) and this project is at c++11 for compatibility. Could you rewrite iequals using only c++11 feature. I would raise the minimum if you were using something quite critical but this is quite simple.

Also on Windows I'm getting a number of sections exceeded error (C1128) which I think is caused by the template implementation in the cpp file. (The TLS build is not in the CI). It's the first time I see C1128 so I'm not sure how to fix it.

jmigual commented 1 year ago

Thank you!