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:
jrandom
2005-10-19 22:38:45 +00:00
committed by zzz
parent 138f7d3b8d
commit 76655d01d0
5 changed files with 22 additions and 8 deletions

View File

@ -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 */