mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(net): add NetworkMetrics (#708)
* Added NetworkMetrics * update docs * add more metrics and make naming consistent * add active inbound and outbound connection metrics
This commit is contained in:
@ -178,6 +178,16 @@ impl PeersManager {
|
||||
self.connection_info.decr_in()
|
||||
}
|
||||
|
||||
/// Returns the number of currently active inbound connections.
|
||||
pub(crate) fn num_inbound_connections(&self) -> usize {
|
||||
self.connection_info.num_inbound
|
||||
}
|
||||
|
||||
/// Returns the number of currently active outbound connections.
|
||||
pub(crate) fn num_outbound_connections(&self) -> usize {
|
||||
self.connection_info.num_outbound
|
||||
}
|
||||
|
||||
/// Invoked when a pending session was closed.
|
||||
pub(crate) fn on_incoming_pending_session_dropped(
|
||||
&mut self,
|
||||
|
||||
Reference in New Issue
Block a user