|
OSSIA
Open Scenario System for Interactive Application
|
Abstract interface for a WebSocket client.
Both plain beast and Socket.IO client implementations derive from this interface.
Public Member Functions | |
| virtual void | connect (const std::string &uri)=0 |
| Start an async connection to the given URI. | |
| virtual void | connect_and_run (const std::string &uri)=0 |
| Connect and block until the connection closes or fails. | |
| virtual void | stop ()=0 |
| virtual bool | connected () const =0 |
| virtual void | send_message (const std::string &request)=0 |
| virtual void | send_message (const rapidjson::StringBuffer &request)=0 |
| virtual void | send_binary_message (std::string_view request)=0 |
Public Attributes | |
| Nano::Signal< void()> | on_open |
| Nano::Signal< void()> | on_close |
| Nano::Signal< void()> | on_fail |
|
pure virtual |
Start an async connection to the given URI.
Implemented in ossia::net::websocket_client_beast, and ossia::net::socketio_client.
|
pure virtual |
Connect and block until the connection closes or fails.
Implemented in ossia::net::websocket_client_beast, and ossia::net::socketio_client.