Package com.biglybt.pif.peers
Interface PeerManager
- All Known Implementing Classes:
PeerManagerImpl
public interface PeerManager
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
Add a new peer, using the default internal Peer implementation (like for peers given in announce reply), using the given address and port.void
void
void
addPeer
(String ip_address, int tcp_port, int udp_port, boolean use_crypto, Map<Object, Object> user_data) createPeerStats
(Peer peer) int
Peer[]
getPeers()
Peer[]
returns the peers for the given addressGet the list of currently pending peersgetPendingPeers
(String address) returns the pending connections to the given addressPiece[]
getStats()
int
boolean
boolean
void
peerDiscovered
(String peer_source, String ip_address, int tcp_port, int udp_port, boolean use_crypto) void
default void
removePeer
(Peer peer) void
removePeer
(Peer peer, String reason, int reason_code) void
requestCancelled
(PeerReadRequest request, Peer sender) void
requestComplete
(PeerReadRequest request, PooledByteBuffer data, Peer sender)
-
Method Details
-
getDownload
- Throws:
DownloadException
-
addPeer
-
addPeer
Add a new peer, using the default internal Peer implementation (like for peers given in announce reply), using the given address and port.- Parameters:
ip_address
- of peer to injectport
- of peer to inject
-
addPeer
-
addPeer
-
addPeer
-
peerDiscovered
-
removePeer
-
removePeer
-
getPeers
Peer[] getPeers() -
getPeers
returns the peers for the given address- Parameters:
address
-- Returns:
-
getPendingPeers
PeerDescriptor[] getPendingPeers()Get the list of currently pending peers- Returns:
- Since:
- 4005
-
getPendingPeers
returns the pending connections to the given address- Parameters:
address
-- Returns:
-
getDiskManager
DiskManager getDiskManager() -
getStats
PeerManagerStats getStats() -
isSeeding
boolean isSeeding() -
isSuperSeeding
boolean isSuperSeeding() -
createPeerStats
-
requestComplete
-
requestCancelled
-
getPieces
Piece[] getPieces() -
getUploadRateLimitBytesPerSecond
int getUploadRateLimitBytesPerSecond() -
getDownloadRateLimitBytesPerSecond
int getDownloadRateLimitBytesPerSecond() -
addListener
-
removeListener
-