socket.io-client-cpp icon indicating copy to clipboard operation
socket.io-client-cpp copied to clipboard

generic TLS handshake errors and solution

Open DraconPern opened this issue 6 years ago • 2 comments

Just want to note that if you are getting a generic TLS handshake error, it's likely that your server is only supporting TLS v1.1 or above. Example is AWS's application load balancer.

Solution is to change line 568 in sio_client_impl to use v1.2: context_ptr ctx = context_ptr(new boost::asio::ssl::context(boost::asio::ssl::context::tlsv12));

DraconPern avatar Jul 17 '18 02:07 DraconPern

THIS.

I recently upgraded from Node.js 9 to 12 (a necessity of features) and my C++ Socket.io connections kept failing. A LOT!

I was sending files (~.7 Mb) over the sockets from C++ client to Node.js server, over a low-bandwidth connection (rural, spotty Internet service) and the socket connections kept silently failing, but no errors were reported. I tried setting all the listeners, and nothing was being called, save for the reconnect listener. It was a very frustrating stability issue!

This one change has restored all of the stability.

I know that the GitHub issue queues are not support forums, but I wanted to comment here in case anyone else was searching for the same symptoms.

Is this a change that could be pushed to the main branch?

coreyp1 avatar Dec 26 '19 20:12 coreyp1

Hi , When i change the version i am getting the following error :

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::system::system_error >' what(): context: An invalid argument was supplied

Any clue what is to be done ?

AbhishekDroid1609 avatar Jul 16 '20 05:07 AbhishekDroid1609