33 #define ASIO_STANDALONE 35 #include <websocketpp/config/asio_no_tls.hpp> 36 #include <websocketpp/server.hpp> 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());
static level const all
Special aggregate value representing "all levels".
connection_type::message_ptr message_ptr
Type of message pointers that this endpoint uses.
static level const frame_payload
One line per frame, includes the full message payload (warning: chatty)
lib::weak_ptr< void > connection_hdl
A handle to uniquely identify a connection.
void init_asio(io_service_ptr ptr, lib::error_code &ec)
initialize asio transport with external io_service (exception free)
void start_accept(lib::error_code &ec)
Starts the server's async connection acceptance loop (exception free)
void set_access_channels(log::level channels)
Set Access logging channel.
void set_error_channels(log::level channels)
Set Error logging channel.
std::size_t run()
wraps the run method of the internal io_service object
void listen(lib::asio::ip::tcp::endpoint const &ep, lib::error_code &ec)
Set up endpoint for listening manually (exception free)
static level const all
Special aggregate value representing "all levels".
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)