Package net.i2p.router.transport.udp
Class UDPAddress
java.lang.Object
net.i2p.router.transport.udp.UDPAddress
basic helper to parse out peer info from a udp address
-
Field Summary
Modifier and TypeFieldDescriptionstatic final char
static final char
(package private) static final int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) static void
getHost()
(package private) InetAddress
As of 0.9.32, will NOT resolve hostnames.(package private) int
(package private) long
getIntroducerExpiration
(int i) (package private) Hash
getIntroducerHash
(int i) (package private) InetAddress
getIntroducerHost
(int i) As of 0.9.32, will NOT resolve hostnames.(package private) byte[]
getIntroducerKey
(int i) (package private) int
getIntroducerPort
(int i) (package private) long
getIntroducerTag
(int i) (package private) byte[]
(package private) int
getMTU()
int
getPort()
(package private) boolean
isIPv4()
(package private) boolean
isIPv6()
toString()
-
Field Details
-
PROP_PORT
- See Also:
-
PROP_HOST
- See Also:
-
PROP_INTRO_KEY
- See Also:
-
PROP_MTU
- See Also:
-
PROP_CAPACITY
- See Also:
-
CAPACITY_TESTING
public static final char CAPACITY_TESTING- See Also:
-
CAPACITY_INTRODUCER
public static final char CAPACITY_INTRODUCER- See Also:
-
PROP_INTRO_HOST_PREFIX
- See Also:
-
PROP_INTRO_PORT_PREFIX
- See Also:
-
PROP_INTRO_KEY_PREFIX
- See Also:
-
PROP_INTRO_TAG_PREFIX
- See Also:
-
PROP_INTRO_EXP_PREFIX
- Since:
- 0.9.30
- See Also:
-
PROP_INTRO_HASH_PREFIX
- Since:
- 0.9.55 for SSU2
- See Also:
-
MAX_INTRODUCERS
static final int MAX_INTRODUCERS- See Also:
-
-
Constructor Details
-
UDPAddress
-
-
Method Details
-
getHost
-
getHostAddress
InetAddress getHostAddress()As of 0.9.32, will NOT resolve hostnames.- Returns:
- InetAddress or null
-
getPort
public int getPort()- Returns:
- 0 if unset or invalid
-
getIntroKey
byte[] getIntroKey()- Returns:
- shouldn't be null but will be if invalid
-
getIntroducerCount
int getIntroducerCount() -
getIntroducerHost
As of 0.9.32, will NOT resolve hostnames.- Returns:
- null if invalid or for SSU2
- Throws:
ArrayIndexOutOfBoundsException
- if i < 0 or i >= getIntroducerCount()
-
getIntroducerPort
int getIntroducerPort(int i) - Returns:
- greater than zero or zero for SSU2
- Throws:
ArrayIndexOutOfBoundsException
- if i < 0 or i >= getIntroducerCount()
-
getIntroducerKey
byte[] getIntroducerKey(int i) - Returns:
- null if no keys or for SSU2
- Throws:
ArrayIndexOutOfBoundsException
- if i < 0 or i >= getIntroducerCount()
-
getIntroducerTag
long getIntroducerTag(int i) - Returns:
- greater than zero
- Throws:
NullPointerException
- if getIntroducerCount() == 0ArrayIndexOutOfBoundsException
- if i < 0 or i >= getIntroducerCount()
-
getIntroducerExpiration
long getIntroducerExpiration(int i) - Returns:
- ms since epoch, zero if unset
- Throws:
NullPointerException
- if getIntroducerCount() == 0ArrayIndexOutOfBoundsException
- if i < 0 or i >= getIntroducerCount()- Since:
- 0.9.30
-
getIntroducerHash
- Returns:
- null if no keys or for SSU1
- Throws:
ArrayIndexOutOfBoundsException
- if i < 0 or i >= getIntroducerCount()- Since:
- 0.9.55
-
isIPv4
boolean isIPv4()- Since:
- 0.9.55
-
isIPv6
boolean isIPv6()- Since:
- 0.9.55
-
getMTU
int getMTU()- Returns:
- 0 if unset or invalid; recitified via MTU.rectify()
- Since:
- 0.9.2
-
toString
-
clearCache
static void clearCache()- Since:
- IPv6
-