forked from I2P_Developers/i2p.i2p
I2PSnark: Use new BW Limits message, remove router.jar dependencies
This commit is contained in:
@ -143,6 +143,11 @@ public interface I2PSession {
|
||||
*/
|
||||
public Destination lookupDest(Hash h) throws I2PSessionException;
|
||||
|
||||
/**
|
||||
* Get the current bandwidth limits
|
||||
*/
|
||||
public int[] bandwidthLimits() throws I2PSessionException;
|
||||
|
||||
/** See I2PSessionMuxedImpl for details */
|
||||
public void addSessionListener(I2PSessionListener lsnr, int proto, int port);
|
||||
/** See I2PSessionMuxedImpl for details */
|
||||
|
@ -656,6 +656,10 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
|
||||
return null;
|
||||
}
|
||||
|
||||
public int[] bandwidthLimits() throws I2PSessionException {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void updateActivity() {
|
||||
_lastActivity = _context.clock().now();
|
||||
if (_isReduced) {
|
||||
|
@ -130,7 +130,7 @@ class I2PSimpleSession extends I2PSessionImpl2 {
|
||||
return null;
|
||||
_bwReceivedLock = new Object();
|
||||
sendMessage(new GetBandwidthLimitsMessage());
|
||||
for (int i = 0; i < 5 && !_destReceived; i++) {
|
||||
for (int i = 0; i < 5 && !_bwReceived; i++) {
|
||||
try {
|
||||
synchronized (_bwReceivedLock) {
|
||||
_bwReceivedLock.wait(1000);
|
||||
|
Reference in New Issue
Block a user