Package net.i2p.router.transport.udp
Class UDPAddress
java.lang.Object
net.i2p.router.transport.udp.UDPAddress
class UDPAddress extends Object
basic helper to parse out peer info from a udp address
-
Field Summary
Fields Modifier and Type Field Description static char
CAPACITY_INTRODUCER
static char
CAPACITY_TESTING
(package private) static int
MAX_INTRODUCERS
static String
PROP_CAPACITY
static String
PROP_HOST
static String
PROP_INTRO_EXP_PREFIX
static String
PROP_INTRO_HOST_PREFIX
static String
PROP_INTRO_KEY
static String
PROP_INTRO_KEY_PREFIX
static String
PROP_INTRO_PORT_PREFIX
static String
PROP_INTRO_TAG_PREFIX
static String
PROP_MTU
static String
PROP_PORT
-
Constructor Summary
Constructors Constructor Description UDPAddress(RouterAddress addr)
-
Method Summary
Modifier and Type Method Description (package private) static void
clearCache()
String
getHost()
(package private) InetAddress
getHostAddress()
As of 0.9.32, will NOT resolve host names.(package private) int
getIntroducerCount()
(package private) long
getIntroducerExpiration(int i)
(package private) InetAddress
getIntroducerHost(int i)
As of 0.9.32, will NOT resolve host names.(package private) byte[]
getIntroducerKey(int i)
(package private) int
getIntroducerPort(int i)
(package private) long
getIntroducerTag(int i)
(package private) byte[]
getIntroKey()
(package private) int
getMTU()
int
getPort()
String
toString()
-
Field Details
-
PROP_PORT
- See Also:
- Constant Field Values
-
PROP_HOST
- See Also:
- Constant Field Values
-
PROP_INTRO_KEY
- See Also:
- Constant Field Values
-
PROP_MTU
- See Also:
- Constant Field Values
-
PROP_CAPACITY
- See Also:
- Constant Field Values
-
CAPACITY_TESTING
public static final char CAPACITY_TESTING- See Also:
- Constant Field Values
-
CAPACITY_INTRODUCER
public static final char CAPACITY_INTRODUCER- See Also:
- Constant Field Values
-
PROP_INTRO_HOST_PREFIX
- See Also:
- Constant Field Values
-
PROP_INTRO_PORT_PREFIX
- See Also:
- Constant Field Values
-
PROP_INTRO_KEY_PREFIX
- See Also:
- Constant Field Values
-
PROP_INTRO_TAG_PREFIX
- See Also:
- Constant Field Values
-
PROP_INTRO_EXP_PREFIX
- Since:
- 0.9.30
- See Also:
- Constant Field Values
-
MAX_INTRODUCERS
static final int MAX_INTRODUCERS- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
getHost
-
getHostAddress
InetAddress getHostAddress()As of 0.9.32, will NOT resolve host names.- 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 host names.- Returns:
- null if invalid
- Throws:
NullPointerException
- if getIntroducerCount() == 0ArrayIndexOutOfBoundsException
- if i < 0 or i >= getIntroducerCount()
-
getIntroducerPort
int getIntroducerPort(int i)- Returns:
- greater than zero
- Throws:
NullPointerException
- if getIntroducerCount() == 0ArrayIndexOutOfBoundsException
- if i < 0 or i >= getIntroducerCount()
-
getIntroducerKey
byte[] getIntroducerKey(int i)- Returns:
- non-null
- Throws:
NullPointerException
- if getIntroducerCount() == 0ArrayIndexOutOfBoundsException
- 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
-
getMTU
int getMTU()- Returns:
- 0 if unset or invalid; recitified via MTU.rectify()
- Since:
- 0.9.2
-
toString
-
clearCache
static void clearCache()- Since:
- IPv6
-