33#define ASIO_STANDALONE
35#include <websocketpp/config/asio_no_tls.hpp>
36#include <websocketpp/server.hpp>
50 m_endpoint.init_asio();
53 m_endpoint.set_message_handler(std::bind(
54 &utility_server::echo_handler,
this,
55 std::placeholders::_1, std::placeholders::_2
61 m_endpoint.
send(hdl, msg->get_payload(), msg->get_opcode());
66 m_endpoint.listen(9002);
void send(connection_hdl hdl, std::string const &payload, frame::opcode::value op, lib::error_code &ec)
Create a message and add it to the outgoing send queue (exception free)
connection_type::message_ptr message_ptr
Type of message pointers that this endpoint uses.
void set_access_channels(log::level channels)
Set Access logging channel.
void set_error_channels(log::level channels)
Set Error logging channel.
Server endpoint role based on the given config.
void start_accept(lib::error_code &ec)
Starts the server's async connection acceptance loop (exception free)
lib::weak_ptr< void > connection_hdl
A handle to uniquely identify a connection.
static level const all
Special aggregate value representing "all levels".
static level const frame_payload
One line per frame, includes the full message payload (warning: chatty)
static level const all
Special aggregate value representing "all levels".