mirror of
https://github.com/monero-project/monero.git
synced 2025-08-03 17:34:18 -04:00
Merge pull request #2753
fa514082
RPC: get_info add rpc_connections_count (Tim L)
This commit is contained in:
commit
a2241e8151
4 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -117,6 +117,11 @@ namespace epee
|
|||
return m_net_server.get_binded_port();
|
||||
}
|
||||
|
||||
long get_connections_count() const
|
||||
{
|
||||
return m_net_server.get_connections_count();
|
||||
}
|
||||
|
||||
protected:
|
||||
net_utils::boosted_tcp_server<net_utils::http::http_custom_handler<t_connection_context> > m_net_server;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue