Socket.IO client implementing websocket_client_interface.
Performs the Engine.IO v4 handshake (HTTP polling followed by WebSocket upgrade) and the Socket.IO v5 CONNECT, then presents incoming Socket.IO EVENT/BINARY_EVENT messages through the standard ws_client_message_handler callback interface. Outgoing send_message/send_binary_message calls are wrapped into Socket.IO EVENT/BINARY_EVENT packets.
|
|
| socketio_client (boost::asio::io_context &ctx) |
| |
|
| socketio_client (boost::asio::io_context &ctx, ws_client_message_handler handler) |
| |
| void | connect (const std::string &uri) override |
| | Start an async connection to the given URI.
|
| |
| void | connect_and_run (const std::string &uri) override |
| | Connect and block until the connection closes or fails.
|
| |
| void | stop () override |
| |
| bool | connected () const override |
| |
| void | send_message (const std::string &request) override |
| |
| void | send_message (const rapidjson::StringBuffer &request) override |
| |
| void | send_binary_message (std::string_view request) override |
| |