diff --git a/router/java/src/net/i2p/router/transport/TransportImpl.java b/router/java/src/net/i2p/router/transport/TransportImpl.java index 9454027d61fcba3cff7573375878a1a4444356c8..2aebf712823f1e488453173a9e980d19e89f1f96 100644 --- a/router/java/src/net/i2p/router/transport/TransportImpl.java +++ b/router/java/src/net/i2p/router/transport/TransportImpl.java @@ -107,10 +107,8 @@ public abstract class TransportImpl implements Transport { /** * How many peers are we connected to? - * For NTCP, this is the same as active, - * but SSU actually looks at idle time for countActivePeers() */ - public int countPeers() { return countActivePeers(); } + public abstract int countPeers(); /** * How many peers are we currently connected to, that we have @@ -161,10 +159,10 @@ public abstract class TransportImpl implements Transport { def *= 4; break; case Router.CAPABILITY_BW256: - def *= 6; + def *= 7; break; case Router.CAPABILITY_BW512: - def *= 8; + def *= 9; break; case Router.CAPABILITY_BW_UNLIMITED: def *= 12; diff --git a/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java b/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java index be60f09e192740e1c1e198ce7a025d511a167cf8..c25c4497a2137a1937b6c70e0e70b544471660ad 100644 --- a/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java +++ b/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java @@ -492,6 +492,10 @@ public class NTCPTransport extends TransportImpl { return removed; } + public int countPeers() { + return _conByIdent.size(); + } + /** * How many peers have we talked to in the last 5 minutes? * As of 0.9.20, actually returns active peer count, not total. diff --git a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java index ff151a6e131dc6cffc6514e9395fec239cf8175e..311fef09298d6bd9dfb8c61c533cab78255b4802 100644 --- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java +++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java @@ -2239,7 +2239,6 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority super.afterSend(m, true); } - @Override public int countPeers() { return _peersByIdent.size(); }