- Use
git clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git
to clone your local repo. - Run
cmake ./
- Run
make install
(if makefile generated) or open generated project (if project file generated) to build. - Outputs is under
./build
, link with the all static libs under./build/lib
and include headers under./build/include
in your client code where you want to use it.
- Use
git clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git
to clone your local repo. - Add
./lib/asio/asio/include
,./lib/websocketpp
and./lib/rapidjson/include
to headers search path. - Include all files under
./src
in your project, addsio_client.cpp
,sio_socket.cpp
,internal/sio_client_impl.cpp
,internal/sio_packet.cpp
to source list. - Include
sio_client.h
in your client code where you want to use it.
You can download and install the Socket.IO C++ client using the vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
vcpkg install socket-io-client
The Socket.IO client port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.