FileDocCategorySizeDatePackage
PEPeerListener.javaAPI DocAzureus 3.0.3.42766Thu Feb 09 19:42:50 GMT 2006org.gudy.azureus2.core3.peer

PEPeerListener

public interface PEPeerListener
Listener for peer events.

Fields Summary
Constructors Summary
Methods Summary
public voidaddAvailability(PEPeer peer, com.aelitis.azureus.core.peermanager.piecepicker.util.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. Upon sending this message, the peer must remember it was sent, and then later send a corresponding removeAvailability message

param
peer the message is about
param
peerHavePieces BitFlags of pieces availabile

public voidremoveAvailability(PEPeer peer, com.aelitis.azureus.core.peermanager.piecepicker.util.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. The BitFlags must be complete, with all pieces from any Bitfield message as well as those from any Have messages.

param
peer the message is about
param
peerHavePieces BitFlags of pieces no longer available

public voidsentBadChunk(PEPeer peer, int piece_num, int total_bad_chunks)
The peer has sent us a bad piece data chunk.

param
peer the peer the message is about
param
piece_num piece that failed hash check
param
total_bad_chunks total number of bad chunks sent by this peer so far

public voidstateChanged(PEPeer peer, int new_state)
The peer has changed to the given state.

param
peer the peer the message is about
param
new_state of peer