1 #ifndef JSONRPC_SERVER_IMPL_BASE_H 2 #define JSONRPC_SERVER_IMPL_BASE_H 4 #include <boost/thread.hpp> 5 #include <boost/bind.hpp> 14 template<
class t_child_
class,
class t_connection_context = epee::net_utils::connection_context_base>
30 m_net_server.get_config_object().m_phandler =
static_cast<t_child_class*
>(
this);
32 LOG_PRINT_L0(
"Binding on " << bind_ip <<
":" << bind_port);
42 bool run(
size_t threads_count,
bool wait =
true)
45 LOG_PRINT(
"Run net_service loop( " << threads_count <<
" threads)...", LOG_LEVEL_0);
48 LOG_ERROR(
"Failed to run net tcp server!");
52 LOG_PRINT(
"net_service loop stopped.", LOG_LEVEL_0);
bool init(const std::string &bind_port="0", const std::string &bind_ip="0.0.0.0")
net_utils::boosted_tcp_server< net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context > > m_net_server
the connection templated-class for one peer connection
unsigned __int64 uint64_t
jsonrpc_server_impl_base(boost::asio::io_service &external_io_service)
bool run(size_t threads_count, bool wait=true)
bool timed_wait_server_stop(uint64_t ms)
jsonrpc_server_impl_base()