socketio / socket.io-client-cpp

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

confused about SIO_TLS #100

Closed eternaltao closed 8 years ago

eternaltao commented 8 years ago

I want to connect a URL like https://xxx and reports error as below:

[2016-06-03 19:52:08] [connect] Successful connection
[2016-06-03 19:52:08] [error] handle_read_http_response error: websocketpp.transport:7 (End of File)
Connection failed.

my compilation of the command line:

~$ cmake -DBOOST_ROOT:STRING=~/boost_1_59_0 -DBOOST_INCLUDEDIR=~/boost_1_59_0/boost -DBOOST_LIBRARYDIR=~/boost_1_59_0/stage/lib -DBOOST_VER:STRING=1.59.0  -DTARGET=sioclient_tls .

~$ make -dSIO_TLS

~$ make install

Do I lack some steps?

eternaltao commented 8 years ago
cmake -DBOOST_LIBRARYDIR=~/boost_1_59_0/stage/lib -DBOOST_INCLUDEDIR=~/boost_1_59_0/boost -DBOOST_ROOT:STRING=~/boost_1_59_0 -DCMAKE_BUILD_TYPE=Debug ./

make install

when compile, LIBS choose ../build/lib/Debug/libsioclient_tls.a add "-lssl -lcrypto"


g++ -Wall -g -std=c++0x -o client client.cpp $(INCLUDE) $(LIBS) -lboost_system -lboost_thread -lpthread -lssl -lcrypto   

And then we can connect wss:// or https