- Protection against modifying metainfos

- Announce peers to local tracker
- Ping node on port reception
- More info on directory pages
- Cleanups
This commit is contained in:
zzz
2010-12-22 22:22:38 +00:00
parent 973407498b
commit 97f0c13c15
9 changed files with 141 additions and 43 deletions

View File

@ -32,6 +32,7 @@ import java.util.Map;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.data.DataHelper;
import net.i2p.data.Destination;
import net.i2p.util.Log;
import org.klomp.snark.bencode.BEValue;
@ -384,6 +385,13 @@ public class Peer implements Comparable
return options;
}
/** @since 0.8.4 */
public Destination getDestination() {
if (sock == null)
return null;
return sock.getPeerDestination();
}
/**
* Shared state across all peers, callers must sync on returned object
* @return non-null