|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PEPeerListener
Listener for peer events.
Method Summary | |
---|---|
void |
addAvailability(PEPeer peer,
BitFlags peerHavePieces)
The peer asserts that their availability should be added to the torrent-global availability pool The peer must send when, and only when, their availability is known but not after going to CLOSING state. |
void |
removeAvailability(PEPeer peer,
BitFlags peerHavePieces)
The peer asserts that their availability must now be taken from the torrent-global availability pool The peer must send this only after having sent a corresponding addAvailability message, and must not send it in a state prior to CLOSING state. |
void |
sentBadChunk(PEPeer peer,
int piece_num,
int total_bad_chunks)
The peer has sent us a bad piece data chunk. |
void |
stateChanged(PEPeer peer,
int new_state)
The peer has changed to the given state. |
Method Detail |
---|
void stateChanged(PEPeer peer, int new_state)
peer
- the peer the message is aboutnew_state
- of peervoid sentBadChunk(PEPeer peer, int piece_num, int total_bad_chunks)
peer
- the peer the message is aboutpiece_num
- piece that failed hash checktotal_bad_chunks
- total number of bad chunks sent by this peer so farvoid addAvailability(PEPeer peer, BitFlags peerHavePieces)
peer
- the message is aboutpeerHavePieces
- BitFlags of pieces availabilevoid removeAvailability(PEPeer peer, BitFlags peerHavePieces)
peer
- the message is aboutpeerHavePieces
- BitFlags of pieces no longer available
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |