epee: remove dependency on common

This commit is contained in:
moneromooo-monero 2017-12-21 11:45:01 +00:00
parent a529f0a6c9
commit 40ab12a773
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
11 changed files with 31 additions and 23 deletions

View file

@ -55,13 +55,14 @@ namespace epee
: m_net_server(external_io_service)
{}
bool init(const std::string& bind_port = "0", const std::string& bind_ip = "0.0.0.0",
bool init(std::function<void(size_t, uint8_t*)> rng, const std::string& bind_port = "0", const std::string& bind_ip = "0.0.0.0",
std::vector<std::string> access_control_origins = std::vector<std::string>(),
boost::optional<net_utils::http::login> user = boost::none)
{
//set self as callback handler
m_net_server.get_config_object().m_phandler = static_cast<t_child_class*>(this);
m_net_server.get_config_object().rng = std::move(rng);
//here set folder for hosting reqests
m_net_server.get_config_object().m_folder = "";