diff options
author | Tim L <timo614@gmail.com> | 2017-11-03 08:24:36 -0400 |
---|---|---|
committer | Tim L <timo614@gmail.com> | 2017-11-07 16:34:49 -0500 |
commit | fa51408272d634cae948bd237344cc92c0eb09e5 (patch) | |
tree | d590db998b7de27c832a7d8caf5664750642efd9 /contrib/epee/include/net/abstract_tcp_server2.h | |
parent | Merge pull request #2764 (diff) | |
download | monero-fa51408272d634cae948bd237344cc92c0eb09e5.tar.xz |
RPC: get_info add rpc_connections_count
Diffstat (limited to 'contrib/epee/include/net/abstract_tcp_server2.h')
-rw-r--r-- | contrib/epee/include/net/abstract_tcp_server2.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/epee/include/net/abstract_tcp_server2.h b/contrib/epee/include/net/abstract_tcp_server2.h index 03f143fe4..33fec8ec5 100644 --- a/contrib/epee/include/net/abstract_tcp_server2.h +++ b/contrib/epee/include/net/abstract_tcp_server2.h @@ -213,6 +213,12 @@ namespace net_utils int get_binded_port(){return m_port;} + long get_connections_count() const + { + auto connections_count = (m_sock_count > 0) ? (m_sock_count - 1) : 0; // Socket count minus listening socket + return connections_count; + } + boost::asio::io_service& get_io_service(){return io_service_;} struct idle_callback_conext_base |