Package net.i2p.router.transport.udp
Class PeerTestState
- java.lang.Object
-
- net.i2p.router.transport.udp.PeerTestState
-
class PeerTestState extends Object
Track the state of a peer test. Used only by PeerTestManager.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PeerTestState.Role
-
Constructor Summary
Constructors Constructor Description PeerTestState(PeerTestState.Role role, boolean isIPv6, long nonce, long now)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessionKey
getAliceIntroKey()
InetAddress
getAliceIP()
If we are Alice, this will contain the IP that Bob says we can be reached at - the IP Charlie says we can be reached at is _aliceIPFromCharlieInetAddress
getAliceIPFromCharlie()
int
getAlicePort()
If we are Alice, this will contain the port that Bob says we can be reached at - the port Charlie says we can be reached at is _alicePortFromCharlieint
getAlicePortFromCharlie()
long
getBeginTime()
when did this test begin?SessionKey
getBobCipherKey()
InetAddress
getBobIP()
SessionKey
getBobMACKey()
int
getBobPort()
SessionKey
getCharlieIntroKey()
InetAddress
getCharlieIP()
int
getCharliePort()
long
getLastSendTime()
when did we last send out a packet?long
getNonce()
PeerTestState.Role
getOurRole()
Are we Alice, bob, or Charlie.long
getReceiveAliceTime()
when did we last hear from alice?long
getReceiveBobTime()
when did we last hear from bob?long
getReceiveCharlieTime()
when did we last hear from charlie?int
incrementPacketsRelayed()
boolean
isIPv6()
Is this an IPv6 test?void
setAliceIntroKey(SessionKey key)
void
setAliceIP(InetAddress ip)
void
setAliceIPFromCharlie(InetAddress ip)
void
setAlicePort(int alicePort)
void
setAlicePortFromCharlie(int alicePortFromCharlie)
void
setBobCipherKey(SessionKey key)
void
setBobIP(InetAddress ip)
void
setBobMACKey(SessionKey key)
void
setBobPort(int bobPort)
void
setCharlieIntroKey(SessionKey key)
void
setCharlieIP(InetAddress ip)
void
setCharliePort(int charliePort)
void
setLastSendTime(long when)
void
setReceiveAliceTime(long when)
void
setReceiveBobTime(long when)
void
setReceiveCharlieTime(long when)
String
toString()
-
-
-
Constructor Detail
-
PeerTestState
public PeerTestState(PeerTestState.Role role, boolean isIPv6, long nonce, long now)
-
-
Method Detail
-
getNonce
public long getNonce()
-
getOurRole
public PeerTestState.Role getOurRole()
Are we Alice, bob, or Charlie.
-
isIPv6
public boolean isIPv6()
Is this an IPv6 test?- Since:
- 0.9.27
-
getAliceIP
public InetAddress getAliceIP()
If we are Alice, this will contain the IP that Bob says we can be reached at - the IP Charlie says we can be reached at is _aliceIPFromCharlie
-
setAliceIP
public void setAliceIP(InetAddress ip)
-
getBobIP
public InetAddress getBobIP()
-
setBobIP
public void setBobIP(InetAddress ip)
-
getCharlieIP
public InetAddress getCharlieIP()
-
setCharlieIP
public void setCharlieIP(InetAddress ip)
-
getAliceIPFromCharlie
public InetAddress getAliceIPFromCharlie()
-
setAliceIPFromCharlie
public void setAliceIPFromCharlie(InetAddress ip)
-
getAlicePort
public int getAlicePort()
If we are Alice, this will contain the port that Bob says we can be reached at - the port Charlie says we can be reached at is _alicePortFromCharlie
-
setAlicePort
public void setAlicePort(int alicePort)
-
getBobPort
public int getBobPort()
-
setBobPort
public void setBobPort(int bobPort)
-
getCharliePort
public int getCharliePort()
-
setCharliePort
public void setCharliePort(int charliePort)
-
getAlicePortFromCharlie
public int getAlicePortFromCharlie()
-
setAlicePortFromCharlie
public void setAlicePortFromCharlie(int alicePortFromCharlie)
-
getAliceIntroKey
public SessionKey getAliceIntroKey()
-
setAliceIntroKey
public void setAliceIntroKey(SessionKey key)
-
getCharlieIntroKey
public SessionKey getCharlieIntroKey()
-
setCharlieIntroKey
public void setCharlieIntroKey(SessionKey key)
-
getBobCipherKey
public SessionKey getBobCipherKey()
-
setBobCipherKey
public void setBobCipherKey(SessionKey key)
-
getBobMACKey
public SessionKey getBobMACKey()
-
setBobMACKey
public void setBobMACKey(SessionKey key)
-
getBeginTime
public long getBeginTime()
when did this test begin?
-
getLastSendTime
public long getLastSendTime()
when did we last send out a packet?
-
setLastSendTime
public void setLastSendTime(long when)
-
getReceiveAliceTime
public long getReceiveAliceTime()
when did we last hear from alice?
-
setReceiveAliceTime
public void setReceiveAliceTime(long when)
-
getReceiveBobTime
public long getReceiveBobTime()
when did we last hear from bob?
-
setReceiveBobTime
public void setReceiveBobTime(long when)
-
getReceiveCharlieTime
public long getReceiveCharlieTime()
when did we last hear from charlie?
-
setReceiveCharlieTime
public void setReceiveCharlieTime(long when)
-
incrementPacketsRelayed
public int incrementPacketsRelayed()
- Returns:
- new value
-
-