Class BlockInfo
java.lang.Object
com.frostwire.jlibtorrent.BlockInfo
Holds the state of a block in a piece. Who we requested
it from and how far along we are at downloading it.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe total number of bytes in this block.intThe number of bytes that have been received for this block.intnumPeers()The number of peers that is currently requesting this block.peer()The peer is the ip address of the peer this block was downloaded from.state()The state this block is in.swig()
-
Constructor Details
-
BlockInfo
- Parameters:
b- the native object
-
-
Method Details
-
swig
- Returns:
- the native object
-
peer
The peer is the ip address of the peer this block was downloaded from.- Returns:
- the peer tcp endpoint
-
bytesProgress
public int bytesProgress()The number of bytes that have been received for this block.- Returns:
- the number of bytes received
-
blockSize
public int blockSize()The total number of bytes in this block.- Returns:
- otal number of bytes
-
state
-
numPeers
public int numPeers()The number of peers that is currently requesting this block. Typically this is 0 or 1, but at the end of the torrent blocks may be requested by more peers in parallel to speed things up.- Returns:
- number of peers
-