Server

struct Server

Public Functions

Server() = default
Server(Server&&) = delete
Server(Server const&) = delete
inline virtual ~Server()
virtual bool ready() const = 0
virtual void send_ping() = 0
virtual void close() = 0
virtual void send_text(std::string_view const &message) = 0

Public Static Functions

static std::unique_ptr<Server> create(Handler&, io::net::tcp::Connection::Factory&)
static std::unique_ptr<Server> create(Handler&, io::net::tcp::Connection::Factory&, Config const&)
struct Binary

Public Members

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

Public Members

std::string_view payload
struct Config

Public Members

size_t read_buffer_size = {}
size_t encode_buffer_size = {}
struct Disconnected
struct Handler

Public Functions

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

Public Members

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

Public Members

std::string_view payload