Class PeerItemFactory
java.lang.Object
com.biglybt.core.peermanager.peerdb.PeerItemFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PeerItem
createPeerItem
(byte[] serialization, byte source, byte handshake_type, int udp_port, String network) Create a peer item using the given peer raw byte serialization (address and port).static PeerItem
createPeerItem
(String address, int tcp_port, byte source, byte handshake_type, int udp_port, byte crypto_level, int up_speed) Create a peer item using the given peer address and port information.
-
Field Details
-
PEER_SOURCE_TRACKER
public static final byte PEER_SOURCE_TRACKER- See Also:
-
PEER_SOURCE_DHT
public static final byte PEER_SOURCE_DHT- See Also:
-
PEER_SOURCE_PEER_EXCHANGE
public static final byte PEER_SOURCE_PEER_EXCHANGE- See Also:
-
PEER_SOURCE_PLUGIN
public static final byte PEER_SOURCE_PLUGIN- See Also:
-
PEER_SOURCE_INCOMING
public static final byte PEER_SOURCE_INCOMING- See Also:
-
PEER_SOURCE_HOLE_PUNCH
public static final byte PEER_SOURCE_HOLE_PUNCH- See Also:
-
HANDSHAKE_TYPE_PLAIN
public static final byte HANDSHAKE_TYPE_PLAIN- See Also:
-
HANDSHAKE_TYPE_CRYPTO
public static final byte HANDSHAKE_TYPE_CRYPTO- See Also:
-
CRYPTO_LEVEL_1
public static final byte CRYPTO_LEVEL_1- See Also:
-
CRYPTO_LEVEL_2
public static final byte CRYPTO_LEVEL_2- See Also:
-
CRYPTO_LEVEL_CURRENT
public static final byte CRYPTO_LEVEL_CURRENT- See Also:
-
-
Constructor Details
-
PeerItemFactory
public PeerItemFactory()
-
-
Method Details
-
createPeerItem
public static PeerItem createPeerItem(String address, int tcp_port, byte source, byte handshake_type, int udp_port, byte crypto_level, int up_speed) Create a peer item using the given peer address and port information.- Parameters:
address
- of peerport
- of peersource
- this peer info was obtained from- Returns:
- peer
-
createPeerItem
public static PeerItem createPeerItem(byte[] serialization, byte source, byte handshake_type, int udp_port, String network) throws Exception Create a peer item using the given peer raw byte serialization (address and port).- Parameters:
serialization
- bytessource
- this peer info was obtained from- Returns:
- peer
- Throws:
Exception
-