Packages that use BEValue
Package
Description
I2P version of the Snark BitTorrent client, enhanced for I2P: peers are I2P destinations, torrents can be served anonymously as hidden services, and metadata carries I2P-specific comment fields.
Bencode parsing and serialization, the canonical BitTorrent encoding used for torrent files and peer messages.
BitTorrent distributed hash table (DHT) implementation following the Mainline protocol, for trackerless peer discovery.
Uses of BEValue in org.klomp.snark
Fields in org.klomp.snark with type parameters of type BEValueModifier and TypeFieldDescriptionPeer.handshakeMapThe handshake map received from the peer.MetaInfo.infoMapOriginal bencoded info dictionary, preserved to keep infohash consistent on re-encode.Methods in org.klomp.snark that return types with arguments of type BEValueModifier and TypeMethodDescriptionMetaInfo.createInfoMap()An unmodifiable view of the info map.Peer.getHandshakeMap()Returns the extension handshake data from the peer.Method parameters in org.klomp.snark with type arguments of type BEValueModifier and TypeMethodDescriptionTrackerInfo.getPeers(List<BEValue> l, byte[] my_id, byte[] infohash, MetaInfo metainfo, I2PSnarkUtil util) List of Dictionaries or List of Strings.voidPeer.setHandshakeMap(Map<String, BEValue> map) Store the extension handshake data and update the request pipeline limit.Constructor parameters in org.klomp.snark with type arguments of type BEValueModifierConstructorDescriptionCreates a new MetaInfo from a Map of BEValues and the SHA1 over the original bencoded info dictionary (this is a hack, we could reconstruct the bencoded stream and recalculate the hash).Creates a PeerID from a Map containing BEncoded peer id, ip and port.privateTrackerInfo(Map<String, BEValue> m, byte[] my_id, byte[] infohash, MetaInfo metainfo, I2PSnarkUtil util) Reads a tracker response into a record.Uses of BEValue in org.klomp.snark.bencode
Methods in org.klomp.snark.bencode that return BEValueModifier and TypeMethodDescriptionBDecoder.bdecode()Read the next indicator, returning null when the stream has ended, or bdecode the rest of the stream and returns the appropriate BEValue encoded object.static BEValueBDecoder.bdecode(InputStream in) Creates a new BDecoder and immediately decodes the first value it sees.BDecoder.bdecodeBytes()Returns the next bencoded value on the stream and makes sure it is a byte array.BDecoder.bdecodeList()Returns the next bencoded value on the stream and makes sure it is a list.BDecoder.bdecodeMap()Returns the next bencoded value on the stream and makes sure it is a map (dictionary).BDecoder.bdecodeNumber()Returns the next bencoded value on the stream and makes sure it is a number.Methods in org.klomp.snark.bencode that return types with arguments of type BEValueModifier and TypeMethodDescriptionBEValue.getList()Returns this BEValue as a List of BEValues.BEValue.getMap()Returns this BEValue as a Map of BEValue keys and BEValue values.Constructor parameters in org.klomp.snark.bencode with type arguments of type BEValueUses of BEValue in org.klomp.snark.dht
Method parameters in org.klomp.snark.dht with type arguments of type BEValueModifier and TypeMethodDescriptionprivate voidKRPC.receiveError(KRPC.ReplyWaiter waiter, List<BEValue> error) Handle an error response.KRPC.receivePeers(NodeInfo nInfo, List<BEValue> peers) Receive 32-byte hashes as peer list.private voidKRPC.receiveQuery(MsgID msgID, Destination dest, int fromPort, String method, Map<String, BEValue> args) Handle and respond to an incoming query.private voidKRPC.receiveResponse(KRPC.ReplyWaiter waiter, Map<String, BEValue> response) Handle the response and alert whoever sent the query it is responding to.