class IntroductionManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IntroductionManager.RelayIntroResult
See receiveRelayIntro()
|
Modifier and Type | Field and Description |
---|---|
static int |
MAX_OUTBOUND
This is enforced in EstablishmentManager
|
Constructor and Description |
---|
IntroductionManager(RouterContext ctx,
UDPTransport transport) |
Modifier and Type | Method and Description |
---|---|
void |
add(PeerState peer) |
void |
cleanup()
Loop and cleanup _nonceToAlice
Called from EstablishmentManager doFailSafe() so we don't need a cleaner timer here.
|
(package private) int |
introducedCount()
Combined IPv4 and IPv6
|
(package private) int |
introducerCount(boolean ipv6)
Not as elaborate as pickInbound() above.
|
boolean |
isInboundTagValid(long tag)
Is this inbound tag currently valid,
i.e.
|
int |
pickInbound(RouterAddress current,
boolean ipv6,
Properties ssuOptions,
int howMany)
Grab a bunch of peers who are willing to be introducers for us that
are locally known (duh) and have published their own SSU address (duh^2).
|
void |
pingIntroducers()
Was part of pickInbound(), moved out so we can call it more often
|
(package private) void |
receiveHolePunch(RemoteHostId charlie,
byte[] data)
We are Alice and we got this from Charlie.
|
(package private) IntroductionManager.RelayIntroResult |
receiveRelayIntro(PeerState2 bob,
Hash alice,
byte[] data)
We are Charlie and we got this from Bob.
|
(package private) void |
receiveRelayRequest(PeerState2 alice,
byte[] data)
We are Bob and we got this from Alice.
|
(package private) void |
receiveRelayResponse(PeerState2 peer,
int status,
byte[] data)
We are Bob and we got this from Charlie, OR
we are Alice and we got this from Bob.
|
void |
remove(PeerState peer) |
void |
reset() |
public static final int MAX_OUTBOUND
public IntroductionManager(RouterContext ctx, UDPTransport transport)
public void reset()
public void add(PeerState peer)
public void remove(PeerState peer)
public boolean isInboundTagValid(long tag)
public int pickInbound(RouterAddress current, boolean ipv6, Properties ssuOptions, int howMany)
current
- current router address, may be nullipv6
- what type is the current address we need introducers for?ssuOptions
- out parameter, options are addedpublic void pingIntroducers()
int introducerCount(boolean ipv6)
ipv6
- what type of address are they introducing us forint introducedCount()
void receiveRelayRequest(PeerState2 alice, byte[] data)
IntroductionManager.RelayIntroResult receiveRelayIntro(PeerState2 bob, Hash alice, byte[] data)
void receiveRelayResponse(PeerState2 peer, int status, byte[] data)
void receiveHolePunch(RemoteHostId charlie, byte[] data)
public void cleanup()