![]() |
Cadabra
Computer algebra system for field theory problems
|
#include <websocket_client.hh>
Classes |
Public Types | |
| using | message_handler = std::function<void(const std::string&)> |
| using | connect_handler = std::function<void()> |
| using | close_handler = std::function<void()> |
| using | fail_handler = std::function<void(const boost::beast::error_code&)> |
Public Member Functions | |
| websocket_client () | |
| ~websocket_client () | |
| websocket_client (const websocket_client &)=delete | |
| websocket_client & | operator= (const websocket_client &)=delete |
| void | set_message_handler (message_handler h) |
| void | set_connect_handler (connect_handler h) |
| void | set_close_handler (close_handler h) |
| void | set_fail_handler (fail_handler h) |
| void | connect (const std::string &uri) |
| void | send (const std::string &message) |
| void | close () |
| void | run () |
| void | stop () |
Private Member Functions | |
| void | on_resolve (const boost::beast::error_code &ec, boost::asio::ip::tcp::resolver::results_type results) |
| void | on_connect (const boost::beast::error_code &ec) |
| void | on_ssl_handshake (const boost::beast::error_code &ec) |
| void | on_handshake (const boost::beast::error_code &ec) |
| void | on_write (const boost::beast::error_code &ec, std::size_t bytes_transferred) |
| void | on_read (const boost::beast::error_code &ec, std::size_t bytes_transferred) |
| void | on_close (const boost::beast::error_code &ec) |
| void | do_read () |
| void | do_write () |
| void | fail (const boost::beast::error_code &ec) |
Private Attributes | |
| boost::asio::io_context | ioc_ |
| boost::asio::ssl::context | ssl_ctx_ |
| boost::asio::ip::tcp::resolver | resolver_ |
| std::unique_ptr< boost::beast::websocket::stream< boost::beast::ssl_stream< boost::asio::ip::tcp::socket > > > | wss_stream_ |
| std::unique_ptr< boost::beast::websocket::stream< boost::asio::ip::tcp::socket > > | ws_stream_ |
| boost::beast::flat_buffer | buffer_ |
| bool | is_ssl_ |
| std::string | host_ |
| std::string | port_ |
| std::string | path_ |
| message_handler | message_handler_ |
| connect_handler | connect_handler_ |
| close_handler | close_handler_ |
| fail_handler | fail_handler_ |
| std::queue< queued_message > | message_queue_ |
| bool | writing_ {false} |
| using websocket_client::close_handler = std::function<void()> |
| using websocket_client::connect_handler = std::function<void()> |
| using websocket_client::fail_handler = std::function<void(const boost::beast::error_code&)> |
| using websocket_client::message_handler = std::function<void(const std::string&)> |
| websocket_client::websocket_client | ( | ) |
| websocket_client::~websocket_client | ( | ) |
|
delete |
| void websocket_client::close | ( | ) |
| void websocket_client::connect | ( | const std::string & | uri | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
delete |
| void websocket_client::run | ( | ) |
| void websocket_client::send | ( | const std::string & | message | ) |
| void websocket_client::set_close_handler | ( | close_handler | h | ) |
| void websocket_client::set_connect_handler | ( | connect_handler | h | ) |
| void websocket_client::set_fail_handler | ( | fail_handler | h | ) |
| void websocket_client::set_message_handler | ( | message_handler | h | ) |
| void websocket_client::stop | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |