mirror of
https://github.com/socketio/socket.io-client-cpp.git
synced 2026-03-31 04:06:26 +00:00
SIO Client
This SIO client is depends on websocket++ and rapidjson, it provides another C++ client implementation for Socket.IO. This library is able to connect to a Socket.IO server 1.0, and its inspired by the socket.io-clientpp project but I've rewrite 90% of the code.
Socket.IO 1.0+ protocol has been implemented!
The code is compatible with 1.0+ protocol only, not with prior protocols.
C++11 only for now
C++11 saves much time for me, so this is C++11 only for the first version. I'll do further compatibility efforts on demand.
Supported features
- Internal thread manangement.
- Sends plain text messages.
- Sends binary messages.
- Sends structured messages with text and binary all together.
- Sends messages with an ack and its corresponding callback.
- Receives messages and automatically sends customable ack if need.
- Automatically ping/pong messages and timeout management.
- Reconnection.
Usage
- Make sure you have the boost libararies installed.
- Include websocket++, rapidjson and
sio_client.cpp,sio_packet.cppin your project. - Include
sio_client.hwhere you want to use it. - Use
messageand its derived classes to compose complex text/binary messages.
sio client specific source is released under the BSD license.
Languages
C++
97.2%
CMake
2.4%
JavaScript
0.4%