Beast-based WebSocket client implementing websocket_client_interface.
More...
Beast-based WebSocket client implementing websocket_client_interface.
|
|
| websocket_client_beast (boost::asio::io_context &ctx) |
| |
|
| websocket_client_beast (boost::asio::io_context &ctx, ws_client_message_handler handler) |
| | Construct with a message handler callback.
|
| |
| | websocket_client_beast (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 |
| |
|
|
Nano::Signal< void()> | on_open |
| |
|
Nano::Signal< void()> | on_close |
| |
|
Nano::Signal< void()> | on_fail |
| |
◆ websocket_client_beast()
| ossia::net::websocket_client_beast::websocket_client_beast |
( |
ws_client_message_handler |
handler | ) |
|
|
explicit |
Construct with own io_context and a message handler callback. The io_context is run internally by connect_and_run().
◆ connect()
| void ossia::net::websocket_client_beast::connect |
( |
const std::string & |
uri | ) |
|
|
overridevirtual |
◆ connect_and_run()
| void ossia::net::websocket_client_beast::connect_and_run |
( |
const std::string & |
uri | ) |
|
|
overridevirtual |
◆ stop()
| void ossia::net::websocket_client_beast::stop |
( |
| ) |
|
|
overridevirtual |
◆ connected()
| bool ossia::net::websocket_client_beast::connected |
( |
| ) |
const |
|
overridevirtual |
◆ send_message() [1/2]
| void ossia::net::websocket_client_beast::send_message |
( |
const std::string & |
request | ) |
|
|
overridevirtual |
◆ send_message() [2/2]
| void ossia::net::websocket_client_beast::send_message |
( |
const rapidjson::StringBuffer & |
request | ) |
|
|
overridevirtual |
◆ send_binary_message()
| void ossia::net::websocket_client_beast::send_binary_message |
( |
std::string_view |
request | ) |
|
|
overridevirtual |