Client

struct Client

Public Functions

Client() = default
Client(Client&&) = delete
Client(Client const&) = delete
inline virtual ~Client()
virtual std::string_view get_interface() const = 0
virtual std::string_view get_current_authority() const = 0
virtual std::string_view get_current_path() const = 0
virtual std::string_view get_proxy() const = 0
virtual bool ready() const = 0
virtual void start() = 0
virtual void stop() = 0
virtual void close() = 0
virtual bool refresh(std::chrono::nanoseconds now) = 0
virtual void send_text(std::string_view const &message) = 0
virtual void touch(std::chrono::nanoseconds now) = 0
virtual size_t total_bytes_received() const = 0

Public Static Functions

static std::unique_ptr<Client> create(Handler&, io::Context&, Config const&, std::function<std::string()> const &create_upgrade_headers)
struct Binary

Public Members

std::span<std::byte const> payload
struct Close

Public Members

std::string_view payload
struct Config

Public Members

std::string_view interface
std::span<io::web::URI const> uris
std::string_view host
bool validate_certificate = {}
std::chrono::nanoseconds connection_timeout = {}
std::chrono::nanoseconds disconnect_on_idle_timeout = {}
bool always_reconnect = {}
io::web::URI proxy
std::string_view query
std::string_view user_agent
std::chrono::nanoseconds request_timeout = {}
std::chrono::nanoseconds ping_frequency = {}
size_t decode_buffer_size = {}
size_t encode_buffer_size = {}
struct Connected
struct Disconnected
struct Handler

Public Functions

virtual void operator()(Connected const&) = 0
virtual void operator()(Disconnected const&) = 0
virtual void operator()(Ready const&) = 0
virtual void operator()(Close const&) = 0
virtual void operator()(Latency const&) = 0
virtual void operator()(Text const&) = 0
virtual void operator()(Binary const&) = 0
struct Latency

Public Members

std::chrono::nanoseconds sample
struct Ready
struct Text

Public Members

std::string_view payload