class IntroductionManager extends Object
| 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) void |
receiveRelayIntro(PeerState2 bob,
Hash alice,
byte[] data)
Processes a relay introduction message received from another peer.
|
(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 add(PeerState peer)
public void cleanup()
int introducedCount()
int introducerCount(boolean ipv6)
ipv6 - what type of address are they introducing us forpublic 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()
void receiveHolePunch(RemoteHostId charlie, byte[] data)
void receiveRelayIntro(PeerState2 bob, Hash alice, byte[] data)
bob - the PeerState2 instance representing the peer that sent the relay introduction messagealice - the Hash object identifying the destination peer ('Alice') to which a HolePunch will be initiateddata - the byte array containing the data payload of the relay introduction messagevoid receiveRelayRequest(PeerState2 alice, byte[] data)
void receiveRelayResponse(PeerState2 peer, int status, byte[] data)
public void remove(PeerState peer)
public void reset()