org.gudy.azureus2.core3.peer.util
Class PeerUtils
java.lang.Object
org.gudy.azureus2.core3.peer.util.PeerUtils
public class PeerUtils
- extends Object
Varies peer connection utility methods.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_CONNECTIONS_PER_TORRENT
public static int MAX_CONNECTIONS_PER_TORRENT
MAX_CONNECTIONS_TOTAL
public static int MAX_CONNECTIONS_TOTAL
PeerUtils
public PeerUtils()
getPeerPriority
public static int getPeerPriority(String address,
int port)
getPeerPriority
public static int getPeerPriority(InetAddress address,
int peer_port)
getPeerPriority
public static int getPeerPriority(byte[] peer_address,
short peer_port)
getPeerPriority
public static int getPeerPriority(byte[] peer_address,
int peer_port)
numNewConnectionsAllowed
public static int numNewConnectionsAllowed(PeerIdentityDataID data_id,
int specific_max)
- Get the number of new peer connections allowed for the given data item,
within the configured per-torrent and global connection limits.
- Returns:
- max number of new connections allowed, or -1 if there is no limit
ignorePeerPort
public static boolean ignorePeerPort(int port)
createPeerID
public static byte[] createPeerID()
createWebSeedPeerID
public static byte[] createWebSeedPeerID()
getCountryDetails
public static String[] getCountryDetails(Peer peer)
getCountryDetails
public static String[] getCountryDetails(PEPeer peer)
getCountryDetails
public static String[] getCountryDetails(InetAddress address)
getNetwork
public static String getNetwork(PEPeer peer)