| Package | Description |
|---|---|
| org.klomp.snark | I2P version of the snark bittorrent client, imported in 2005 and heavily enhanced to add a web UI, DHT support, and other features. |
| Modifier and Type | Field and Description |
|---|---|
protected MetaInfo | Peer.metainfoWill start out null in magnet mode. |
(package private) MetaInfo | PeerCoordinator.metainfoWill be null when in magnet mode. |
| Modifier and Type | Method and Description |
|---|---|
MetaInfo | MagnetState.getMetaInfo()Returns the MetaInfo for this magnet state. |
MetaInfo | Snark.getMetaInfo()The metainfo. |
MetaInfo | Storage.getMetaInfo()Returns the MetaInfo associated with this Storage. |
MetaInfo | PeerCoordinator.getMetaInfo()Returns the metainfo for this torrent. |
MetaInfo | MetaInfo.reannounce(String announce)Creates a copy of this MetaInfo that shares everything except the announce URL. |
| Modifier and Type | Method and Description |
|---|---|
boolean | SnarkManager.addTorrent(MetaInfo metainfo,
BitField bitfield,
String filename,
File baseFile,
boolean dontAutoStart)Add a torrent from a MetaInfo. |
(package private) static File | Storage.getStagingBase(String tempDir,
String baseName,
MetaInfo metainfo)The staging directory for a torrent: the configured temp dir plus a
subdirectory unique to the torrent. |
void | Snark.gotMetaInfo(PeerCoordinator coordinator,
MetaInfo metainfo)Called when the PeerCoordinator got the MetaInfo via magnet. |
void | CoordinatorListener.gotMetaInfo(PeerCoordinator coordinator,
MetaInfo metainfo)Called when the PeerCoordinator got the MetaInfo via magnet. |
void | Snark.replaceMetaInfo(MetaInfo metainfo)Call after editing torrent. |
void | MagnetState.setMetaInfo(MetaInfo meta)Store the MetaInfo for a completed magnet download. |
void | Peer.setMetaInfo(MetaInfo meta)Switches from magnet mode to normal mode with metainfo. |
void | PeerState.setMetaInfo(MetaInfo meta)Switch from magnet mode to normal mode. |
| Constructor and Description |
|---|
MagnetState(byte[] iHash,
MetaInfo meta)Creates a new MagnetState for the given info hash. |
MetaInfo(MetaInfo old,
String newAnnounce,
List<List<String>> newAnnounceList,
String newComment,
String newCreatedBy,
List<String> newUrlList)Will not change infohash. |
PartialPiece(Piece piece,
int len,
File tempDir,
MetaInfo meta)A PartialPiece for the given piece with the specified length. |
Peer(I2PSocket sock,
InputStream in,
OutputStream out,
byte[] myId,
byte[] infohash,
MetaInfo metainfo)Incoming connection. |
Peer(PeerID peerID,
byte[] myId,
byte[] infohash,
MetaInfo metainfo)Outgoing connection. |
PeerCoordinator(I2PSnarkUtil util,
byte[] id,
byte[] infohash,
MetaInfo metainfo,
Storage storage,
CoordinatorListener listener,
Snark torrent,
BandwidthListener bwl)Create a peer coordinator for the torrent. |
PeerState(Peer peer,
PeerListener listener,
BandwidthListener bwl,
MetaInfo metainfo,
PeerConnectionIn in,
PeerConnectionOut out)Create the peer state for the torrent. |
Storage(I2PSnarkUtil util,
File baseFile,
MetaInfo metainfo,
StorageListener listener,
boolean preserveFileNames)Creates a new storage based on the supplied MetaInfo. |
TrackerClient(I2PSnarkUtil util,
MetaInfo meta,
String additionalTrackerURL,
PeerCoordinator coordinator,
Snark snark)Call start() to start it. |
TrackerInfo(InputStream in,
byte[] my_id,
byte[] infohash,
MetaInfo metainfo,
I2PSnarkUtil util)Create tracker info for the metainfo. |
TrackerInfo(Set<Hash> hashes,
int interval,
int complete,
int incomplete,
int downloaders,
String error,
byte[] my_id,
byte[] infohash,
MetaInfo metainfo,
I2PSnarkUtil util)To convert returned UDPTracker data to the standard structure |
WebPeer(PeerCoordinator coord,
URI uri,
PeerID peerID,
MetaInfo metainfo)Outgoing connection. |