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 classPeerTestState.Role - 
Constructor Summary
Constructors Constructor Description PeerTestState(PeerTestState.Role role, boolean isIPv6, long nonce, long now) - 
Method Summary
Modifier and Type Method Description SessionKeygetAliceIntroKey()InetAddressgetAliceIP()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 _aliceIPFromCharlieInetAddressgetAliceIPFromCharlie()intgetAlicePort()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 _alicePortFromCharlieintgetAlicePortFromCharlie()longgetBeginTime()when did this test begin?SessionKeygetBobCipherKey()InetAddressgetBobIP()SessionKeygetBobMACKey()intgetBobPort()SessionKeygetCharlieIntroKey()InetAddressgetCharlieIP()intgetCharliePort()longgetLastSendTime()when did we last send out a packet?longgetNonce()PeerTestState.RolegetOurRole()Are we Alice, bob, or Charlie.longgetReceiveAliceTime()when did we last hear from alice?longgetReceiveBobTime()when did we last hear from bob?longgetReceiveCharlieTime()when did we last hear from charlie?intincrementPacketsRelayed()booleanisIPv6()Is this an IPv6 test?voidsetAliceIntroKey(SessionKey key)voidsetAliceIP(InetAddress ip)voidsetAliceIPFromCharlie(InetAddress ip)voidsetAlicePort(int alicePort)voidsetAlicePortFromCharlie(int alicePortFromCharlie)voidsetBobCipherKey(SessionKey key)voidsetBobIP(InetAddress ip)voidsetBobMACKey(SessionKey key)voidsetBobPort(int bobPort)voidsetCharlieIntroKey(SessionKey key)voidsetCharlieIP(InetAddress ip)voidsetCharliePort(int charliePort)voidsetLastSendTime(long when)voidsetReceiveAliceTime(long when)voidsetReceiveBobTime(long when)voidsetReceiveCharlieTime(long when)StringtoString() 
- 
Constructor Details
 - 
Method Details
- 
getNonce
public long getNonce() - 
getOurRole
Are we Alice, bob, or Charlie. - 
isIPv6
public boolean isIPv6()Is this an IPv6 test?- Since:
 - 0.9.27
 
 - 
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
 - 
getBobIP
 - 
setBobIP
 - 
getCharlieIP
 - 
setCharlieIP
 - 
getAliceIPFromCharlie
 - 
setAliceIPFromCharlie
 - 
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
 - 
setAliceIntroKey
 - 
getCharlieIntroKey
 - 
setCharlieIntroKey
 - 
getBobCipherKey
 - 
setBobCipherKey
 - 
getBobMACKey
 - 
setBobMACKey
 - 
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
 
 - 
toString
 
 -