A websocket++ and rapidjson based C++ client for Socket.IO. This library is able to connect to a Socket.IO server, and then send and receive messages.
- Make sure you have the boost libararies installed.
- Include websocket++, rapidjson and
socket_io_handler.cpp
in your project. - Include
socket_io_handler.hpp
where you want to use it.
The minimal amount of code needed to make a connection to a Socket.IO server is as follows:
`socketio_client_handler_ptr handler(new socketio_client_handler());
client endpoint(handler);
client::connection_ptr con = endpoint.get_connection(handler->perform_handshake("ws://localhost:8080"));`
For examples of event binding and additional settings, see the sample code in the msvc folder.
This client isn't a full port of the Socket.IO client at this point. It doesn't handle reconnection events, fire off default events, or maintain any status indicators. If you'd like to help make this a full implementation of the Socket.IO client, fork away!