class InboundEstablishState extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
InboundEstablishState.InboundState
States for inbound SSU session establishment.
|
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
_aliceIP |
protected int |
_alicePort |
protected byte[] |
_bobIP |
protected int |
_bobPort |
protected RouterContext |
_context |
protected int |
_createdSentCount |
protected InboundEstablishState.InboundState |
_currentState |
protected long |
_establishBegin |
protected boolean |
_introductionRequested |
protected long |
_lastSend |
protected Log |
_log |
protected long |
_nextSend |
protected RouterIdentity |
_receivedConfirmedIdentity |
protected RouterIdentity |
_receivedUnconfirmedIdentity |
protected RemoteHostId |
_remoteHostId |
protected int |
_rtt |
protected long |
_sentRelayTag |
protected static long |
MAX_DELAY
Max delay including backoff.
|
protected static long |
RETRANSMIT_DELAY
Basic delay before backoff
Transmissions at 0, 1, 3, 7 sec.
|
| Modifier | Constructor and Description |
|---|---|
protected |
InboundEstablishState(RouterContext ctx,
InetSocketAddress addr)
For SSU2
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(OutNetMessage msg)
Queue a message to be sent after the session is established.
|
void |
complete()
Notify successful completion
|
protected boolean |
confirmedFullyReceived()
Have we fully received the SessionConfirmed messages from Alice?
Caller must synch on this.
|
void |
createdPacketSent()
Note that we just sent a SessionCreated packet
|
void |
fail() |
RouterIdentity |
getConfirmedIdentity()
Who is Alice (null if forged/unknown)
Note that this isn't really confirmed - see below.
|
long |
getEstablishBeginTime() |
long |
getLifetime()
How long have we been trying to establish this session?
|
long |
getLifetime(long now)
How long have we been trying to establish this session?
|
OutNetMessage |
getNextQueuedMessage()
Pull from the message queue
|
long |
getNextSendTime() |
byte[] |
getReceivedOurIP() |
byte[] |
getReceivedX() |
(package private) RemoteHostId |
getRemoteHostId()
RemoteHostId, uniquely identifies an attempt
|
(package private) int |
getRTT() |
byte[] |
getSentIP()
What IP do they appear to be on?
|
int |
getSentPort()
What port number do they appear to be coming from?
|
long |
getSentRelayTag() |
long |
getSentSignedOnTime() |
InboundEstablishState.InboundState |
getState() |
int |
getVersion() |
boolean |
isComplete() |
boolean |
isIntroductionRequested()
True (default) if no extended options in session request,
or value of flag bit in the extended options.
|
protected void |
packetReceived()
Call from synchronized method only
|
boolean |
sessionRequestReceived() |
void |
setSentRelayTag(long tag) |
String |
toString() |
protected final byte[] _aliceIP
protected final int _alicePort
protected byte[] _bobIP
protected final int _bobPort
protected final RouterContext _context
protected int _createdSentCount
protected InboundEstablishState.InboundState _currentState
protected final long _establishBegin
protected boolean _introductionRequested
protected long _lastSend
protected final Log _log
protected long _nextSend
protected RouterIdentity _receivedConfirmedIdentity
protected RouterIdentity _receivedUnconfirmedIdentity
protected final RemoteHostId _remoteHostId
protected int _rtt
protected long _sentRelayTag
protected static final long MAX_DELAY
protected static final long RETRANSMIT_DELAY
protected InboundEstablishState(RouterContext ctx, InetSocketAddress addr)
public void addMessage(OutNetMessage msg)
public void complete()
protected boolean confirmedFullyReceived()
public void createdPacketSent()
public void fail()
public RouterIdentity getConfirmedIdentity()
public long getEstablishBeginTime()
public long getLifetime()
public long getLifetime(long now)
public OutNetMessage getNextQueuedMessage()
public long getNextSendTime()
public byte[] getReceivedOurIP()
public byte[] getReceivedX()
RemoteHostId getRemoteHostId()
int getRTT()
public byte[] getSentIP()
public int getSentPort()
public long getSentRelayTag()
public long getSentSignedOnTime()
public InboundEstablishState.InboundState getState()
public int getVersion()
public boolean isComplete()
public boolean isIntroductionRequested()
protected void packetReceived()
public boolean sessionRequestReceived()
public void setSentRelayTag(long tag)