Class BTPeerIDByteDecoder
java.lang.Object
com.biglybt.core.peermanager.utils.BTPeerIDByteDecoder
Used for identifying clients by their peerID.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static boolean(package private) static final booleanprivate static final HashSetprivate static final HashSetprivate static AEDiagnosticsLogger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidassertDecode(String client_result, byte[] peer_id) private static voidassertDecode(String client_result, String peer_id) private static StringasUTF8ByteString(String text) static StringDecodes the given peerID, returning an identification string.static Stringprivate static StringdecodeBitCometClient(String peer_id, byte[] peer_id_bytes) private static StringdecodeBitSpiritClient(String peer_id, byte[] peer_id_bytes) protected static StringgetPrintablePeerID(byte[] peer_id) protected static StringgetPrintablePeerID(byte[] peer_id, char fallback_char) static StringidentifyAwkwardClient(byte[] peer_id) static voidlogClientDiscrepancy(String peer_id_name, String handshake_name, String discrepancy, String protocol, byte[] peer_id) private static voidlogClientDiscrepancyToFile(String line_to_log) (package private) static voidlogUnknownClient(byte[] peer_id_bytes, boolean to_debug_out) (package private) static voidlogUnknownClient(String peer_id, String net) private static StringlogUnknownClient0(byte[] peer_id_bytes) static voidprivate static StringmakePeerIDReadableAndUsable(byte[] peer_id) (package private) static byte[]peerIDStringToBytes(String peer_id)
-
Field Details
-
LOG_UNKNOWN
static final boolean LOG_UNKNOWN -
logged_discrepancies
-
logger
-
client_logging_allowed
static boolean client_logging_allowed -
logged_ids
-
-
Constructor Details
-
BTPeerIDByteDecoder
public BTPeerIDByteDecoder()
-
-
Method Details
-
logUnknownClient0
- Throws:
IOException
-
asUTF8ByteString
-
logClientDiscrepancy
-
logClientDiscrepancyToFile
-
logUnknownClient
static void logUnknownClient(byte[] peer_id_bytes, boolean to_debug_out) -
logUnknownClient
-
decode0
-
decode
-
identifyAwkwardClient
-
decodeBitSpiritClient
-
decodeBitCometClient
-
getPrintablePeerID
-
getPrintablePeerID
-
makePeerIDReadableAndUsable
-
peerIDStringToBytes
-
assertDecode
-
assertDecode
-
main
-