25 #include <boost/filesystem.hpp>    26 #include <zmqpp/proxy.hpp>    33                                    const boost::property_tree::ptree &cfg,
    37     port_      = cfg.get<uint16_t>(
"module_config.port", 8976);
    38     interface_ = cfg.get<std::string>(
"module_config.interface", 
"127.0.0.1");
    43                                           << endpoint_colorized);
    55     INFO(
"Websocket module registered shutdown. Will now stop websocket server.");
 uint16_t port_
Port to bind the websocket endpoint. 
 
virtual void run() override
This is the main loop of the module. 
 
This is the header file for a generated source file, GitSHA1.cpp. 
 
CoreUtilsPtr utils_
Pointer to the core utils, which gives access to scheduler and others. 
 
std::string underline(const T &in)
 
bool is_running_
Boolean indicating whether the main loop should run or not. 
 
std::unique_ptr< WSServer > wssrv_
Our websocket server object. 
 
std::string green(const T &in)
 
All modules that provides features to Leosac shall be in this namespace. 
 
Base class for module implementation. 
 
std::string interface_
IP address of the interface to listen on. 
 
zmqpp::reactor reactor_
The reactor object we poll() on in the main loop. 
 
WebSockAPIModule(zmqpp::context &ctx, zmqpp::socket *pipe, const boost::property_tree::ptree &cfg, CoreUtilsPtr utils)
 
void run(const std::string &interface, uint16_t port)
 
std::shared_ptr< CoreUtils > CoreUtilsPtr
 
std::string format(const std::string &escape_code, const T &in)
Return a string containing the escape code, a string representation of T and the clear escape string...
 
CoreUtilsPtr core_utils()
This module explicitly expose CoreUtils to other object in the module.