2005-10-19 jrandom
* Ported the snark bittorrent client to I2P such that it is compatible with i2p-bt and azneti2p. For usage information, grab an update and run "java -jar lib/i2psnark.jar". It isn't currently multitorrent capable, but adding in support would be fairly easy (see PeerAcceptor.java:49) * Don't allow leaseSets expiring too far in the future (thanks postman)
This commit is contained in:
@ -292,7 +292,11 @@ public class EepGet {
|
||||
}
|
||||
|
||||
public void stopFetching() { _keepFetching = false; }
|
||||
public void fetch() {
|
||||
/**
|
||||
* Blocking fetch, returning true if the URL was retrieved, false if all retries failed
|
||||
*
|
||||
*/
|
||||
public boolean fetch() {
|
||||
_keepFetching = true;
|
||||
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
@ -301,7 +305,7 @@ public class EepGet {
|
||||
try {
|
||||
sendRequest();
|
||||
doFetch();
|
||||
return;
|
||||
return true;
|
||||
} catch (IOException ioe) {
|
||||
for (int i = 0; i < _listeners.size(); i++)
|
||||
((StatusListener)_listeners.get(i)).attemptFailed(_url, _bytesTransferred, _bytesRemaining, _currentAttempt, _numRetries, ioe);
|
||||
@ -328,6 +332,7 @@ public class EepGet {
|
||||
|
||||
for (int i = 0; i < _listeners.size(); i++)
|
||||
((StatusListener)_listeners.get(i)).transferFailed(_url, _bytesTransferred, _bytesRemaining, _currentAttempt);
|
||||
return false;
|
||||
}
|
||||
|
||||
/** return true if the URL was completely retrieved */
|
||||
|
@ -1,4 +1,11 @@
|
||||
$Id: history.txt,v 1.300 2005/10/17 22:14:01 dust Exp $
|
||||
$Id: history.txt,v 1.301 2005/10/19 00:15:15 jrandom Exp $
|
||||
|
||||
2005-10-19 jrandom
|
||||
* Ported the snark bittorrent client to I2P such that it is compatible
|
||||
with i2p-bt and azneti2p. For usage information, grab an update and run
|
||||
"java -jar lib/i2psnark.jar". It isn't currently multitorrent capable,
|
||||
but adding in support would be fairly easy (see PeerAcceptor.java:49)
|
||||
* Don't allow leaseSets expiring too far in the future (thanks postman)
|
||||
|
||||
2005-10-19 jrandom
|
||||
* Bugfix for the auto-update code to handle different usage patterns
|
||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.271 $ $Date: 2005/10/17 19:39:46 $";
|
||||
public final static String ID = "$Revision: 1.272 $ $Date: 2005/10/19 00:15:15 $";
|
||||
public final static String VERSION = "0.6.1.3";
|
||||
public final static long BUILD = 2;
|
||||
public final static long BUILD = 3;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -538,8 +538,10 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
|
||||
}
|
||||
}
|
||||
|
||||
/** I don't think it'll ever make sense to have a lease last for a full day */
|
||||
private static final long MAX_LEASE_FUTURE = 24*60*60*1000;
|
||||
/**
|
||||
* Don't let leaseSets go 20 minutes into the future
|
||||
*/
|
||||
static final long MAX_LEASE_FUTURE = 20*60*1000;
|
||||
|
||||
/**
|
||||
* Determine whether this leaseSet will be accepted as valid and current
|
||||
|
@ -66,7 +66,7 @@ class TransientDataStore implements DataStore {
|
||||
/** nothing published more than 5 minutes in the future */
|
||||
private final static long MAX_FUTURE_PUBLISH_DATE = 5*60*1000;
|
||||
/** don't accept tunnels set to expire more than 3 hours in the future, which is insane */
|
||||
private final static long MAX_FUTURE_EXPIRATION_DATE = 3*60*60*1000;
|
||||
private final static long MAX_FUTURE_EXPIRATION_DATE = KademliaNetworkDatabaseFacade.MAX_LEASE_FUTURE;
|
||||
|
||||
public void put(Hash key, DataStructure data) {
|
||||
if (data == null) return;
|
||||
|
Reference in New Issue
Block a user