Package net.i2p.router.transport.udp
Class PeerTestState
java.lang.Object
net.i2p.router.transport.udp.PeerTestState
Track the state of a peer test.
  Used only by PeerTestManager.
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructorsConstructorDescriptionPeerTestState(PeerTestState.Role role, PeerState bob, boolean isIPv6, long nonce, long now) 
- 
Method SummaryModifier and TypeMethodDescriptiongetAlice()SSU2 onlyIf 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 _aliceIPFromCharlieintIf 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 _alicePortFromCharlieintlongwhen did this test begin?getBob()getBobIP()intintlongwhen did we last send out a packet?longgetNonce()Are we Alice, bob, or Charlie.longwhen did we last hear from alice?longwhen did we last hear from bob?longwhen did we last hear from charlie?intbooleanisIPv6()Is this an IPv6 test?voidsetAlice(InetAddress ip, int port, Hash hash) voidsetAlice(PeerState2 alice) SSU2 onlyvoidvoidvoidsetAliceKeys(SessionKey ck, SessionKey mk) voidsetAlicePortFromCharlie(int alicePortFromCharlie) voidsetCharlie(InetAddress ip, int port, Hash hash) voidvoidsetCharliePort(int charliePort) voidsetLastSendTime(long when) voidsetReceiveAliceTime(long when) voidsetReceiveBobTime(long when) voidsetReceiveCharlieTime(long when) toString()
- 
Constructor Details- 
PeerTestState- Parameters:
- bob- null if role is BOB
 
 
- 
- 
Method Details- 
getNoncepublic long getNonce()
- 
getOurRoleAre we Alice, bob, or Charlie.
- 
getBob- Returns:
- null if we are bob
- Since:
- 0.9.54
 
- 
isIPv6public boolean isIPv6()Is this an IPv6 test?- Since:
- 0.9.27
 
- 
getAliceIPIf 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
- 
getAliceSSU2 only- Since:
- 0.9.54
 
- 
setAliceSSU2 only- Since:
- 0.9.54
 
- 
setAlice- Parameters:
- hash- SSU2 only, null for SSU1
- Since:
- 0.9.54
 
- 
getBobIP
- 
getCharlieIP
- 
setCharlie- Parameters:
- hash- SSU2 only, null for SSU1
- Since:
- 0.9.54
 
- 
getAliceIPFromCharlie
- 
setAliceIPFromCharlie
- 
getAlicePortpublic 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
- 
getBobPortpublic int getBobPort()
- 
getCharliePortpublic int getCharliePort()
- 
setCharliePortpublic void setCharliePort(int charliePort) 
- 
getAlicePortFromCharliepublic int getAlicePortFromCharlie()
- 
setAlicePortFromCharliepublic void setAlicePortFromCharlie(int alicePortFromCharlie) 
- 
getAliceIntroKey
- 
setAliceIntroKey
- 
getAliceCipherKey- Since:
- 0.9.52
 
- 
getAliceMACKey- Since:
- 0.9.52
 
- 
setAliceKeys- Parameters:
- ck- cipher key
- mk- MAC key
- Since:
- 0.9.52
 
- 
getCharlieIntroKey
- 
setCharlieIntroKey
- 
getBobCipherKey
- 
getBobMACKey
- 
getBeginTimepublic long getBeginTime()when did this test begin?
- 
getLastSendTimepublic long getLastSendTime()when did we last send out a packet?
- 
setLastSendTimepublic void setLastSendTime(long when) 
- 
getReceiveAliceTimepublic long getReceiveAliceTime()when did we last hear from alice?
- 
setReceiveAliceTimepublic void setReceiveAliceTime(long when) 
- 
getReceiveBobTimepublic long getReceiveBobTime()when did we last hear from bob?
- 
setReceiveBobTimepublic void setReceiveBobTime(long when) 
- 
getReceiveCharlieTimepublic long getReceiveCharlieTime()when did we last hear from charlie?
- 
setReceiveCharlieTimepublic void setReceiveCharlieTime(long when) 
- 
incrementPacketsRelayedpublic int incrementPacketsRelayed()- Returns:
- new value
 
- 
toString
 
-