Browse Source

i2p.router.net.tunnels.successrate

pull/791/head
orignal 8 years ago
parent
commit
0b46495afd
  1. 8
      I2PControl.cpp
  2. 1
      I2PControl.h

8
I2PControl.cpp

@ -79,6 +79,8 @@ namespace client
m_RouterInfoHandlers["i2p.router.net.bw.outbound.1s"] = &I2PControlService::OutboundBandwidth1S; m_RouterInfoHandlers["i2p.router.net.bw.outbound.1s"] = &I2PControlService::OutboundBandwidth1S;
m_RouterInfoHandlers["i2p.router.net.status"] = &I2PControlService::NetStatusHandler; m_RouterInfoHandlers["i2p.router.net.status"] = &I2PControlService::NetStatusHandler;
m_RouterInfoHandlers["i2p.router.net.tunnels.participating"] = &I2PControlService::TunnelsParticipatingHandler; m_RouterInfoHandlers["i2p.router.net.tunnels.participating"] = &I2PControlService::TunnelsParticipatingHandler;
m_RouterInfoHandlers["i2p.router.net.tunnels.successrate"] =
&I2PControlService::TunnelsSuccessRateHandler;
m_RouterInfoHandlers["i2p.router.net.total.received.bytes"] = &I2PControlService::NetTotalReceivedBytes; m_RouterInfoHandlers["i2p.router.net.total.received.bytes"] = &I2PControlService::NetTotalReceivedBytes;
m_RouterInfoHandlers["i2p.router.net.total.sent.bytes"] = &I2PControlService::NetTotalSentBytes; m_RouterInfoHandlers["i2p.router.net.total.sent.bytes"] = &I2PControlService::NetTotalSentBytes;
@ -427,6 +429,12 @@ namespace client
InsertParam (results, "i2p.router.net.tunnels.participating", transit); InsertParam (results, "i2p.router.net.tunnels.participating", transit);
} }
void I2PControlService::TunnelsSuccessRateHandler (std::ostringstream& results)
{
int rate = i2p::tunnel::tunnels.GetTunnelCreationSuccessRate ();
InsertParam (results, "i2p.router.net.tunnels.successrate", rate);
}
void I2PControlService::InboundBandwidth1S (std::ostringstream& results) void I2PControlService::InboundBandwidth1S (std::ostringstream& results)
{ {
double bw = i2p::transport::transports.GetInBandwidth (); double bw = i2p::transport::transports.GetInBandwidth ();

1
I2PControl.h

@ -81,6 +81,7 @@ namespace client
void NetDbActivePeersHandler (std::ostringstream& results); void NetDbActivePeersHandler (std::ostringstream& results);
void NetStatusHandler (std::ostringstream& results); void NetStatusHandler (std::ostringstream& results);
void TunnelsParticipatingHandler (std::ostringstream& results); void TunnelsParticipatingHandler (std::ostringstream& results);
void TunnelsSuccessRateHandler (std::ostringstream& results);
void InboundBandwidth1S (std::ostringstream& results); void InboundBandwidth1S (std::ostringstream& results);
void OutboundBandwidth1S (std::ostringstream& results); void OutboundBandwidth1S (std::ostringstream& results);
void NetTotalReceivedBytes (std::ostringstream& results); void NetTotalReceivedBytes (std::ostringstream& results);

Loading…
Cancel
Save