diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-11-14 15:54:33 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-11-14 15:54:33 +0200 |
commit | a2241e815118dfd0767449eec7de4bb279adfd8f (patch) | |
tree | f056ac3599c51661aecaf75b196fc14a969362fd /contrib/epee/include/net/abstract_tcp_server2.h | |
parent | Merge pull request #2752 (diff) | |
parent | RPC: get_info add rpc_connections_count (diff) | |
download | monero-a2241e815118dfd0767449eec7de4bb279adfd8f.tar.xz |
Merge pull request #2753
fa514082 RPC: get_info add rpc_connections_count (Tim L)
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 |