OSSIA
Open Scenario System for Interactive Application
|
Low-level websocket & http server for oscquery. More...
Inherited by ossia::net::websocket_simple_server.
Low-level websocket & http server for oscquery.
Public Member Functions | |
websocket_server (ossia::net::network_context_ptr ctx) | |
template<typename Handler > | |
void | set_open_handler (Handler h) |
template<typename Handler > | |
void | set_close_handler (Handler h) |
template<typename Handler > | |
void | set_message_handler (Handler h) |
void | listen (uint16_t port=9002) |
void | start_accept (boost::system::error_code &ec) |
void | run () |
void | stop () |
void | close (connection_handler hdl) |
void | send_message (connection_handler hdl, const std::string &message) |
void | send_message (connection_handler hdl, const ossia::net::server_reply &message) |
void | send_message (connection_handler hdl, const rapidjson::StringBuffer &message) |
void | send_binary_message (connection_handler hdl, const std::string &message) |
void | send_binary_message (connection_handler hdl, std::string_view message) |
server_t & | impl () |
Static Public Member Functions | |
static void | init_handler (websocketpp::connection_hdl, boost::asio::ip::tcp::socket &s) |
Protected Attributes | |
std::shared_ptr< server_t > | m_server |
ossia::net::network_context_ptr | m_context |
bool | m_owns_context {} |
|
inline |
ec = boost::asio::error::make_error_code(boost::asio::error::con_creation_failed);