Class PeerItem
java.lang.Object
com.biglybt.core.peermanager.peerdb.PeerItem
- All Implemented Interfaces:
PeerDescriptor
Represents a peer item, unique by ip address + port combo.
NOTE: Overrides equals().
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]
private final byte
private final byte
private final int
private final String
private final int
private final byte
private final short
private final short
private final short
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
static byte
convertSourceID
(String source) static String
convertSourceString
(byte source_id) boolean
byte
byte
getIP()
source as defined in DownloadAnnounceResultPeerlong
byte[]
byte
int
int
int
hashCode()
boolean
isIPv4()
boolean
-
Field Details
-
address
private final byte[] address -
udp_port
private final short udp_port -
tcp_port
private final short tcp_port -
source
private final byte source -
hashcode
private final int hashcode -
handshake
private final byte handshake -
crypto_level
private final byte crypto_level -
up_speed
private final short up_speed -
priority
private final int priority -
network
-
-
Constructor Details
-
Method Details
-
getSerialization
public byte[] getSerialization() -
getAddressString
-
getIP
- Specified by:
getIP
in interfacePeerDescriptor
-
getNetwork
-
getTCPPort
public int getTCPPort()- Specified by:
getTCPPort
in interfacePeerDescriptor
-
getUDPPort
public int getUDPPort()- Specified by:
getUDPPort
in interfacePeerDescriptor
-
getSource
public byte getSource() -
getPeerSource
Description copied from interface:PeerDescriptor
source as defined in DownloadAnnounceResultPeer- Specified by:
getPeerSource
in interfacePeerDescriptor
- Returns:
-
getHandshakeType
public byte getHandshakeType() -
getCryptoLevel
public byte getCryptoLevel() -
useCrypto
public boolean useCrypto()- Specified by:
useCrypto
in interfacePeerDescriptor
-
equals
-
hashCode
public int hashCode() -
compareTo
-
getPriority
public long getPriority() -
convertSourceString
-
convertSourceID
-
isIPv4
public boolean isIPv4()
-