|
Electroneum
|
#include <abstract_tcp_server2.h>


Classes | |
| struct | idle_callback_conext |
| struct | idle_callback_conext_base |
Public Types | |
| typedef boost::shared_ptr< connection< t_protocol_handler > > | connection_ptr |
| typedef t_protocol_handler::connection_context | t_connection_context |
Public Member Functions | |
| boosted_tcp_server (t_connection_type connection_type) | |
| boosted_tcp_server (boost::asio::io_service &external_io_service, t_connection_type connection_type) | |
| ~boosted_tcp_server () | |
| void | create_server_type_map () |
| bool | init_server (uint32_t port, const std::string address="0.0.0.0", ssl_options_t ssl_options=ssl_support_t::e_ssl_support_autodetect) |
| bool | init_server (const std::string port, const std::string &address="0.0.0.0", ssl_options_t ssl_options=ssl_support_t::e_ssl_support_autodetect) |
| bool | run_server (size_t threads_count, bool wait=true, const boost::thread::attributes &attrs=boost::thread::attributes()) |
| Run the server's io_service loop. More... | |
| bool | timed_wait_server_stop (uint64_t wait_mseconds) |
| wait for service workers stop More... | |
| void | send_stop_signal () |
| Stop the server. More... | |
| bool | is_stop_signal_sent () const noexcept |
| const std::atomic< bool > & | get_stop_signal () const noexcept |
| void | set_threads_prefix (const std::string &prefix_name) |
| bool | deinit_server () |
| size_t | get_threads_count () |
| void | set_connection_filter (i_connection_filter *pfilter) |
| void | set_default_remote (epee::net_utils::network_address remote) |
| bool | add_connection (t_connection_context &out, boost::asio::ip::tcp::socket &&sock, network_address real_remote, epee::net_utils::ssl_support_t ssl_support=epee::net_utils::ssl_support_t::e_ssl_support_autodetect) |
| try_connect_result_t | try_connect (connection_ptr new_connection_l, const std::string &adr, const std::string &port, boost::asio::ip::tcp::socket &sock_, const boost::asio::ip::tcp::endpoint &remote_endpoint, const std::string &bind_ip, uint32_t conn_timeout, epee::net_utils::ssl_support_t ssl_support) |
| bool | connect (const std::string &adr, const std::string &port, uint32_t conn_timeot, t_connection_context &cn, const std::string &bind_ip="0.0.0.0", epee::net_utils::ssl_support_t ssl_support=epee::net_utils::ssl_support_t::e_ssl_support_autodetect) |
| template<class t_callback > | |
| bool | connect_async (const std::string &adr, const std::string &port, uint32_t conn_timeot, const t_callback &cb, const std::string &bind_ip="0.0.0.0", epee::net_utils::ssl_support_t ssl_support=epee::net_utils::ssl_support_t::e_ssl_support_autodetect) |
| t_protocol_handler::config_type & | get_config_object () |
| int | get_binded_port () |
| long | get_connections_count () const |
| boost::asio::io_service & | get_io_service () |
| template<class t_handler > | |
| bool | add_idle_handler (t_handler t_callback, uint64_t timeout_ms) |
| template<class t_handler > | |
| bool | global_timer_handler (boost::shared_ptr< idle_callback_conext< t_handler >> ptr) |
| template<class t_handler > | |
| bool | async_call (t_handler t_callback) |
Public Attributes | |
| std::map< std::string, t_connection_type > | server_type_map |
Definition at line 207 of file abstract_tcp_server2.h.
| typedef boost::shared_ptr<connection<t_protocol_handler> > epee::net_utils::boosted_tcp_server< t_protocol_handler >::connection_ptr |
Definition at line 218 of file abstract_tcp_server2.h.
| typedef t_protocol_handler::connection_context epee::net_utils::boosted_tcp_server< t_protocol_handler >::t_connection_context |
Definition at line 219 of file abstract_tcp_server2.h.
| epee::net_utils::boosted_tcp_server< t_protocol_handler >::boosted_tcp_server | ( | t_connection_type | connection_type | ) |
Construct the server to listen on the specified TCP address and port, and serve up files from the given directory.
|
explicit |
| epee::net_utils::boosted_tcp_server< t_protocol_handler >::~boosted_tcp_server | ( | ) |
| bool epee::net_utils::boosted_tcp_server< t_protocol_handler >::add_connection | ( | t_connection_context & | out, |
| boost::asio::ip::tcp::socket && | sock, | ||
| network_address | real_remote, | ||
| epee::net_utils::ssl_support_t | ssl_support = epee::net_utils::ssl_support_t::e_ssl_support_autodetect |
||
| ) |
|
inline |
Definition at line 311 of file abstract_tcp_server2.h.
|
inline |
Definition at line 332 of file abstract_tcp_server2.h.
| bool epee::net_utils::boosted_tcp_server< t_protocol_handler >::connect | ( | const std::string & | adr, |
| const std::string & | port, | ||
| uint32_t | conn_timeot, | ||
| t_connection_context & | cn, | ||
| const std::string & | bind_ip = "0.0.0.0", |
||
| epee::net_utils::ssl_support_t | ssl_support = epee::net_utils::ssl_support_t::e_ssl_support_autodetect |
||
| ) |
| bool epee::net_utils::boosted_tcp_server< t_protocol_handler >::connect_async | ( | const std::string & | adr, |
| const std::string & | port, | ||
| uint32_t | conn_timeot, | ||
| const t_callback & | cb, | ||
| const std::string & | bind_ip = "0.0.0.0", |
||
| epee::net_utils::ssl_support_t | ssl_support = epee::net_utils::ssl_support_t::e_ssl_support_autodetect |
||
| ) |
| void epee::net_utils::boosted_tcp_server< t_protocol_handler >::create_server_type_map | ( | ) |
|
inline |
Definition at line 248 of file abstract_tcp_server2.h.
|
inline |
Definition at line 271 of file abstract_tcp_server2.h.
|
inline |
|
inline |
Definition at line 273 of file abstract_tcp_server2.h.
|
inline |
Definition at line 280 of file abstract_tcp_server2.h.
|
inlinenoexcept |
Definition at line 244 of file abstract_tcp_server2.h.
|
inline |
Definition at line 250 of file abstract_tcp_server2.h.
|
inline |
Definition at line 321 of file abstract_tcp_server2.h.
| bool epee::net_utils::boosted_tcp_server< t_protocol_handler >::init_server | ( | uint32_t | port, |
| const std::string | address = "0.0.0.0", |
||
| ssl_options_t | ssl_options = ssl_support_t::e_ssl_support_autodetect |
||
| ) |

| bool epee::net_utils::boosted_tcp_server< t_protocol_handler >::init_server | ( | const std::string | port, |
| const std::string & | address = "0.0.0.0", |
||
| ssl_options_t | ssl_options = ssl_support_t::e_ssl_support_autodetect |
||
| ) |
|
inlinenoexcept |
Definition at line 242 of file abstract_tcp_server2.h.
| bool epee::net_utils::boosted_tcp_server< t_protocol_handler >::run_server | ( | size_t | threads_count, |
| bool | wait = true, |
||
| const boost::thread::attributes & | attrs = boost::thread::attributes() |
||
| ) |
Run the server's io_service loop.

| void epee::net_utils::boosted_tcp_server< t_protocol_handler >::send_stop_signal | ( | ) |
Stop the server.
| void epee::net_utils::boosted_tcp_server< t_protocol_handler >::set_connection_filter | ( | i_connection_filter * | pfilter | ) |
|
inline |
Definition at line 254 of file abstract_tcp_server2.h.
| void epee::net_utils::boosted_tcp_server< t_protocol_handler >::set_threads_prefix | ( | const std::string & | prefix_name | ) |
| bool epee::net_utils::boosted_tcp_server< t_protocol_handler >::timed_wait_server_stop | ( | uint64_t | wait_mseconds | ) |
wait for service workers stop
| try_connect_result_t epee::net_utils::boosted_tcp_server< t_protocol_handler >::try_connect | ( | connection_ptr | new_connection_l, |
| const std::string & | adr, | ||
| const std::string & | port, | ||
| boost::asio::ip::tcp::socket & | sock_, | ||
| const boost::asio::ip::tcp::endpoint & | remote_endpoint, | ||
| const std::string & | bind_ip, | ||
| uint32_t | conn_timeout, | ||
| epee::net_utils::ssl_support_t | ssl_support | ||
| ) |
| std::map<std::string, t_connection_type> epee::net_utils::boosted_tcp_server< t_protocol_handler >::server_type_map |
Definition at line 227 of file abstract_tcp_server2.h.